This newsgroup is great. I am learning alot from just reading the post
here. I hope someone will be able to help with this query.
-------------
#!/usr/bin/perl-w
print "please enter a word then press enter\n";
@a= <STDIN>;
$L =@a;
for ($i=0; $i<=$L; $i++){
print $a[$i];
}
print "\n there are $L varibles in the hash";
print "\n why wont $a[$0] print out "
------------------
When I execute the code above, the first item in the array does is not
printed by the forloop. So if I enter the words press return " \n " after
each one.
Fish \n
have \n
underwater \n
weapons \n
The program prints out
have
underwater
weapons
I can access the item $[$0] outside the for loop. I am confused. Is it
something to do with newline characters?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]