Hello,
I am trying to write a perl script to parse a string into an array. The
string has the fields separated by tabs. So what I want to do is read each
field into a variable so I can process the data further.
what I have is something like this;
open($rpt, $file);
while (<rpt>)
{
$line = $_;
#now what I want is something like
$field_1 = $line[0];
$field_2 = $line[1];
# of course this doesn't work so How do I do it?
}
An example string in the file might be like this.
995253 \t 1234 \t "address" \t "Name"
Thanks in advance for the help,
Sam