I think you want:
my $word=shift;instead of:
my $word=$_;Outside of a subroutine, shift removes the first element from the @ARGV array, which usually contains program arguments (like C and C++'s "argv" parameter to main()).
In reply to Re: use of uninitialized value in concatenation
by William G. Davis
in thread use of uninitialized value in concatenation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |