I have hundreds of Perl scripts that
I use. Many of these scripts
process some kind of data, such as
URLs, email addresses, or paths. Historically, I would write Perl scripts that
would obtain this data from an input
file or from the keyboard. For
example, I would run an application, copy
and paste the application's resulting
data into an input file, then run a Perl
script that read from the input file.
One day, however, all this changed. I
started using the Win32::Clipboard
extension. I can't tell you why it took
so long for me to realize a better way
of providing input for my Perl scripts. I suppose all that copying and pasting
never really bothered me enough to
do something about it.
With the Win32::Clipboard
extension, the way I provide input to scripts
has changed. For example, I have one
script that formats network packets
captured by the Ethereal network
tracing program. When network traffic is
captured, all I need to do is copy a
particular packet to the Windows
Clipboard. The script continuously
monitors the Clipboard for changes.
When a change is detected, the script
retrieves the packet of data from the
Clipboard, decodes it, and formats it
so that it's legible to humans. The
script then writes the formatted data
back to the Clipboard. Therefore, with
this script, all I need to do is run
Ethereal, copy a packet to the Clipboard,
then paste the formatted results into
an email or a report. . . .
Already a VIP member?
Please log on to view the full article
Why become a VIP member?
VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine
When Microsoft announced its Windows Live OneCare security and PC health product over five years (as MSN OneCare), Symantec, McAfee, and the other consumer-oriented security vendors reacted with stunning vigor. ...
Get Mark Minasi’s Windows Server 2008 Audio CDs "Windows expert, consultant and best-selling author Mark Minasi shows you if 2008 is right for you and, if so, how to get the most out of it!
Take Control of Your Email Optimize your email storage – Download this white paper to learn key how-to’s in email storage management.
Get Windows IT Pro To Go! The Windows IT Pro Magazine Master CD is a powerful combination of content and convenience. Order now, and save up to 25%--plus you’ll get online access to new articles each and every month! Subscribe today!