John W. Krahn wrote:
Peter Daum wrote:
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 "
From: Peter Daum
> I occasionally have to write Perl scripts that should behave the same on
> Unix- and DOS-like Systems. One little problem I encounter there is:
>
> For quick hacks, the "while(<>)" mechanism is very handy, because it
> saves a lot of typing. On Unix, I can call a script as a fi
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 con
Shawn H. Corey wrote:
Peter Daum wrote:
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 th
From: Peter Daum
>
> I occasionally have to write Perl scripts that should behave the same
on
> Unix- and DOS-like Systems. One little problem I encounter there is:
I am using Camelbox Perl on WinXP. This is my command line for unit
tests:
perl -MTest::Harness -e "@ARGV= map glob, @ARGV if $^O =
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 con
Ed Avis wrote:
Peter Daum yahoo.de> writes:
With more recent Perl versions, when
a script is called with '*.xyz' it will just try to open '*.xyz' and
fail.
What version of Perl do you have? (perl -V)
... when I 1st encountered this problem, it was with ActivePerl 5.8
generally, I try t
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;
wit
Peter Daum yahoo.de> writes:
>With more recent Perl versions, when
>a script is called with '*.xyz' it will just try to open '*.xyz' and
>fail.
What version of Perl do you have? (perl -V)
--
Ed Avis
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail:
Peter Daum wrote:
Is all this really necessary, or is there a better / more elegant way?
I've always used:
beg...@argv=glob(@ARGV)}
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
My favourite four-lett
Hi,
I occasionally have to write Perl scripts that should behave the same on
Unix- and DOS-like Systems. One little problem I encounter there is:
For quick hacks, the "while(<>)" mechanism is very handy, because it
saves a lot of typing. On Unix, I can call a script as a filter, with
filenames o
11 matches
Mail list logo