APM: shift question
Goldilox
Goldilox at teachnet.edb.utexas.edu
Sat Oct 19 18:04:11 CDT 2002
How come I can go
$x=shift @array;
and $x is equal to the first array element, but
shift @array;
doesn't put the first element to $_?
I tried printing $_:
#!/usr/bin/perl -w
use CGI;
$cg=new CGI;
print $cg->header;
@directories = qw(01Jan 02Feb 03Mar 04Apr 05May 06Jun 07Jul 08Aug 09Sep 10Oct
11Nov 12Dec);
print "Here ", at directories,"<br>";
shift @directories;
print "Here is \$_: $_";
print $_;
and it is empty. Any hints?
Rhett
More information about the Austin
mailing list