"sr" == Sean Rima
writes:
perldoc is good. perldoc <module name> or perldoc -f <builtin> So, perldoc -f split would have given it right to you. ericb sr> Hi Mattias! sr> On Sun, 26 Mar 2000, Mattias Hermansson wrote:
Hi,
I am trying to read a file in Perl and put each line into 2 variables. Each line constats of something like 2:255/90 asb32331
How do I read each line and split it.
Ignore sorted :) Case of RTFM :)
Oh! That's so helpful, without telling where to read...
I'd do:
open(FILE, "program |");
while ($in = <FILE>) { ($first,$last) = split $in; }
The split line may or may not work. man perlre should do the trick.
Also man perl is a great piece of info...
sr> You are correct. Saying RTFM is no answer :) I looked in man perl and man sr> perlfunc and seen the split option. Which did the trick. sr> Sean sr> -- sr> Linux User: #124682 ICQ: 679813 sr> My Current Uptime is 1d, 0h and 3m on Linux 2.2.13 sr> It said "Needs Windows 95 or better". So I installed Linux... sr> ...Any system which depends on human reliability is unreliable. sr> -- sr> To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com sr> For additional commands send e-mail to suse-linux-e-help@suse.com sr> Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/