split takes an optional third argument which says how many elements to split the string into, so it will work for your purposes:
my $line = "1 http:/abcd efgh/"; my($number, $address) = split ' ', $line, 2; # $number now contains "1"; # $address now contains "http:/abcd efgh/";
Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.
In reply to Re: Reading file into two arrays
by aaron_baugher
in thread Reading file into two arrays
by subr01
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |