tokyobuddha has asked for the wisdom of the Perl Monks concerning the following question:
First off i have a file with hostname and dir like so
hostname
"/etc/"
"/usr"
hostname
my $file = '/scripts/clients'; open(DATA, $file) || die "Can't open $file: $!\n"; $raw_data=<DATA>; while (<DATA>) { foreach ($raw_data) { @new_data= split(/ms/, @raw_data); $client = shift(@new_data);
Thanks for your help
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Read File into array and split
by Joost (Canon) on Mar 07, 2008 at 02:52 UTC | |
by tokyobuddha (Novice) on Mar 07, 2008 at 03:28 UTC | |
by ikegami (Patriarch) on Mar 07, 2008 at 05:44 UTC | |
by tokyobuddha (Novice) on Mar 07, 2008 at 09:39 UTC | |
by ikegami (Patriarch) on Mar 08, 2008 at 05:52 UTC | |
by hipowls (Curate) on Mar 07, 2008 at 03:59 UTC | |
by tokyobuddha (Novice) on Mar 07, 2008 at 05:44 UTC | |
by hipowls (Curate) on Mar 08, 2008 at 00:01 UTC |