in reply to Re: split() Problem
in thread split() Problem
Most of my scripts start with
# always use those: use strict; use warnings; use Data::Dumper;
When you suspect that split isn't working the way you think it is, try adding the line print Dumper \@foo; immediately after the split, and look if the results are what you execpted it to be.
The $foo[$_] is always empty so
for iterates over the values in the array, not the indexes. So instead of $foo[$_] just write $_.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: split() Problem
by Omukawa (Acolyte) on Jul 22, 2008 at 10:52 UTC |