in reply to Read from and write to file
does the same thing as those 3 lines. Also, another option to lowercasing everything is simply to use a case-insensitive regex option (/i).my ($command, $name, $address) = split(/\s/, $input_command);
As far as your specific question about scanning the file...I assume you'd do it the same way you're breaking down the input command...read line from file, split line, compare.
I would say use Tie::File for max efficiency to make the change on the fly.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Read from and write to file
by Cenobite (Novice) on Apr 05, 2007 at 20:47 UTC | |
by TStanley (Canon) on Apr 05, 2007 at 22:33 UTC | |
by Cenobite (Novice) on Apr 05, 2007 at 22:38 UTC |