|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
You probably have blank lines in your input. In the split doco, under "As another special case, ...", you'll see how your pattern (' ') is handled specially. Whenever $line equals "\n", split(' ',$line) will return (): all of those 10 variables ($site, ..., $length) will be undef (i.e. "uninitialized value"). If you want to ignore them, you can do something like this:
[Aside: $a and $b are not good choices for variable names as they have special meaning to Perl - see perlvar] -- Ken In reply to Re: Use of uninitialized value $site in concatenation (.) when excute the perl script
by kcott
|
|