in reply to MS XP and ARGV

well, use strict; would have caught the typo ( print should be { print

i'm using winxppro, perl 5.6.1. here's my test_cmdline.pl:

#!/usr/local/bin/perl -w use strict; use diagnostics; $|++; for my $line (@ARGV) { print $line; }
which results in:

c:\>perl test_cmdline.pl one two three onetwothree c:\>

~Particle ;Þ

Replies are listed 'Best First'.
Re: Re: MS XP and ARGV
by gellyfish (Monsignor) on Mar 05, 2002 at 12:06 UTC

    well, use strict; would have caught the typo ( print should be { print

    This is a syntax error - the program would have failed to compile with or without use strict;. It is much safer to cut and paste example code than to retype it :)

    /J\

Re: Re: MS XP and ARGV
by Anonymous Monk on Mar 05, 2002 at 03:54 UTC
    Actually I do have the ";" after the " print $line" command.
    The type-o was in my message post.