Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I would like to split this line so that the numbers end up into variables
($opcode,$date,$bw,$delmb,$delpr,$recmb,$recpr) = split(/ /,$line);
$test1 = join('|',$opcode,$date,$recmb);
print "$test1\n";
and i get the output :
test1|22/11/1999|
But i would like to see the output:
test1|22/11/1999|263
Can someone give me a solution ?
test1 22/11/1999 64 47 6% 263 38% 24 38% 47 73% 61 95% 63 98%I tried to use :
($opcode,$date,$bw,$delmb,$delpr,$recmb,$recpr) = split(/ /,$line);
$test1 = join('|',$opcode,$date,$recmb);
print "$test1\n";
and i get the output :
test1|22/11/1999|
But i would like to see the output:
test1|22/11/1999|263
Can someone give me a solution ?
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: strip multiple spaces
by autark (Friar) on Aug 01, 2000 at 05:23 UTC | |
Re: strip multiple spaces
by chromatic (Archbishop) on Aug 01, 2000 at 04:45 UTC | |
(jjhorner) strip multiple spaces
by jjhorner (Hermit) on Aug 01, 2000 at 04:49 UTC |
Back to
Seekers of Perl Wisdom