Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
@data = ('webpage1','webpage2'); print "Web page needed: \n"; chomp($_ = <>); foreach $data (@data) { $hit = ($data =~ /$_/); if ($hit) { print "Web page number = $data.\n"; last; } } if (!$hit) { $data = pop(@data); print "$data\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Appending an array
by boo_radley (Parson) on May 30, 2002 at 18:24 UTC | |
by Anonymous Monk on May 30, 2002 at 18:42 UTC | |
by bbfu (Curate) on May 30, 2002 at 19:21 UTC | |
by Anonymous Monk on May 31, 2002 at 11:08 UTC | |
by boo_radley (Parson) on May 31, 2002 at 14:42 UTC | |
by ChemBoy (Priest) on May 31, 2002 at 16:37 UTC | |
by the_0ne (Pilgrim) on May 30, 2002 at 19:22 UTC |