it's essentially the same thing, only instead of handing the match to the
print operator, we store it in @list

like so:

open(FP, "$tempfile"); # Open $tempfile for reading
while(<FP>) { push @list, /(\S+)/ }

$list[0] will hold the first match, $list[1] the 2nd and so forth

hope this helps,

Jos

> Hi Jos,
>
> Perhaps you could advise me.  How can I put the hosts pulled from
$tempfile
> into an array or variable?
> open(FP, "$tempfile"); # Open $tempfile for reading
>                 while(<FP>) {
>                         print /(\S+)/;
>                         print "\n";
>
>                 }
>
> Thank you,
> Tyler
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to