in reply to Where to declare?
my @dirlist; print qq(Enter a valid directory); chomp (my $ans = <STDIN>); while ( $ans ne "" ) { if ( $ans =~ m/foo/g ) { push @dirlist, $ans; } else { print qq(That is not a valid dir); } print qq(Enter a valid directory); chomp ($ans = <STDIN>); } # @dirlist is now filled happily
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Where to declare?
by traveler (Parson) on Oct 24, 2001 at 23:11 UTC |