I'm writing a collection of filters that read from the CygWin /
Windows system copy buffer (/dev/clipboard) and write to STDOUT. I
can certainly write Perl to open this "file" and read from it, but I
wondered if there was a way to put it into the shebang line. I don't
have any reason to want to do this except for the brevity and the
learning experience.
I've read perldoc perlrun but find it pretty confusing. Things I've
tried unsuccessfully are:
#!/usr/bin/perl /dev/clipboard
#!/usr/bin/perl < /dev/clipboard
#!/usr/bin/perl -- /dev/clipboard
The body of the script always begins
while (defined (my $line = <>)) {
...etc
}
I figure I've just not got the switches right on the #! line... any
help? Also, assuming it's possible, is there any reason NOT to do this?
Thanks!
Chap
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/