in reply to Problem with blank array (maybe) - Perl newbie
Nice state machine. Your immediate problem is that you're pushing $_ onto @allow_edit when you really want to be pushing $value.
split works just like the docs say it does :-) Here's an example for you: my ($name,$value) = split /=/, $string;
Rather than slurping the entire file into an array and then copying part of that array to another array, I'd just use a while loop to read a line at a time and only create an array for the stuff you want in @allow_edit. There's nothing wrong with the way you did it, that's just what I would do.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem with blank array (maybe) - Perl newbie
by hmag (Acolyte) on Mar 24, 2006 at 08:28 UTC |