>>>>> "HP" == Harry Putnam <rea...@newsguy.com> writes:

  HP> print "Now lets ditch the rest in a for loop\n";
  HP> for (@ARGV){

change that for to a while. for will create a list of aliases to the
array elements passed to it. it doesn't check its length as you seem to
think. while will loop until @ARGV is actually empty.

  HP>   my $ditch = shift;
  HP>   print "Ditching <$ditch>\n";
  HP>   $ditch = '';
  HP> }
  HP> print "ARGV after shifting away args in \`for' loop:
  HP>      ARGV=<@ARGV>
  HP> OOOPS... ARGV still has <". @ARGV ."> member\n";

put some spaces in that print. it is hard to see that @ARGV is being
concated between strings.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
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