>It's always better to reply in the mailing list also, since some users are
>always better and can correct code:-)
Sorry for that.
Yes, this is what I'm looking for. Thank you
>To access each field, you just have to access theindivudual array elements
>
>open FILE, $file or die "Cannot open
It's always better to reply in the mailing list also, since some users
are always better and can correct code:-)
To access each field, you just have to access theindivudual array elements
open FILE, $file or die "Cannot open file: $!\n";
while () {
my @list = split; # splits using a space as deli
At 08:37 PM 10/22/01 +0200, José A. Ferrer wrote:
>Please,
>
>I have a text file separated with one or more whitespaces. I need to
>extract each line to scalar variables everything but whitespaces. How can
>it be done in perl ?
open IN, $file or die "open failed for $file: $!\n";
while () {
open the file,
while () {
my @list = split(/ /, $_);
..do something with the list..
}
This way you have to make the appropriate work inside each loop in the while
because @list gets the new line value each time..
Etienne
"José A. Ferrer" wrote:
> Please,
>
> I have a text file separated wit
Please,
I have a text file separated with one or more whitespaces. I need to
extract each line to scalar variables everything but whitespaces. How can
it be done in perl ?
TIA.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]