On Sun, 12 Jun 2005 11:49:37 -0700 (PDT)
Christopher Spears <[EMAIL PROTECTED]> wrote:
> I am trying to update a script I wrote to automate
> g++. Here is an excerpt:
>
> #!/bin/perl -w
> use strict;
>
> my $number_of_args = @ARGV;
>
> open STDERR, ">./caught_errors" or die "Can't create
> caught_errors: $!";
>
> if ($number_of_args == 0)
> {
> print "Not enough arguments!\n";
> }
>
> foreach (my $i = 0; $i < $number_of_args; $i++)
> {
> print "g++ $ARGV[i] \n";
======>$ARGV[$i]
> }
>
> When I run the script like so:
>
> ./script blah
>
> I get the following error message:
>
> Argument "i" isn't numeric in array element at
> ./cedit01 line 61.
> g++ blah
>
> "g++ blah" is proper result that I am looking for.
> However, I don't understand the statement above it.
> What does that mean?
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
--
Whatever you do will be insignificant,but
the important is you do it!
It doesn't matter who you are, it's what
you do that takes you far!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>