Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

(jjhorner) strip multiple spaces

by jjhorner (Hermit)
on Aug 01, 2000 at 04:49 UTC ( #25378=note: print w/replies, xml ) Need Help??


in reply to strip multiple spaces

This works:

#!/usr/bin/perl -w use strict; my $line = "test1 22/11/1999 64 47 6% 263 38% 24 38% 47 73% 61 95% 63 98%"; my @stuff = split('\s+',$line); my $test1 = join("|",$stuff[0],$stuff[1],$stuff[5]); print "$test1\n";
J. J. Horner
Linux, Perl, Apache, Stronghold, Unix
jhorner@knoxlug.org http://www.knoxlug.org/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://25378]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2021-03-03 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (80 votes). Check out past polls.

    Notices?