Urbs has asked for the wisdom of the Perl Monks concerning the following question:
Thank you so much for having a look! Urbsopen(clients, "<clientlist.txt") || die "Can't open clients: $!\n"; open(file_compare, "<client_last_backup.csv") || die "Can't open file_ +compare: $!\n"; open(CSV_OUT, "> lastbackup.csv") || die "Unable to open lastbackup.cs +v: $!"; print CSV_OUT "SERVER,CLIENT,LAST SUCCESSFUL FULL,LAST SUCCESSFUL INCR +,LAST ATTEMPT\n"; my @clients = ""; LOOKUP: while(<clients>) { @clients = $_; $client = shift @clients; chomp $client; CLIENTS: while (<file_compare> ) { if (m/$client/) { print CSV_OUT "$_"; } #print CSV_OUT "$client"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Newbie can't figure out looping a while (if)
by GrandFather (Saint) on Apr 18, 2008 at 01:29 UTC | |
by Urbs (Novice) on Apr 18, 2008 at 17:20 UTC | |
|
Re: Newbie can't figure out looping a while (if)
by Cody Pendant (Prior) on Apr 18, 2008 at 01:15 UTC | |
|
Re: Newbie can't figure out looping a while (if)
by ikegami (Patriarch) on Apr 18, 2008 at 01:15 UTC |