Peter Daum wrote:

Shawn H. Corey wrote:
I've always used:

beg...@argv=glob(@ARGV)}

... I still need at least:

BEGIN{ @ARGV=map { glob($_) } @ARGV }

but that's already much shorter - thanks :-)

Unfortunately, this leads right to the next problem:
I also need "binmode" to turn off cr/lf conversion on DOS;
with "while (<>)" I don't know where to do this anymore,
because AFAIK, this has to be done after open, but before
the 1st I/O; now before the "while" the file hasn't been
opened yet, after the while it is already too late ... ;-)


Anywhere before the first read. You could do it after you start reading STDIN but whatever you read before will end in "\r\n".


binmode STDIN, ':raw';
while( <> ){

See `perldoc -f binmode`


--
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

My favourite four-letter word is "Done!"

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to