Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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
Domain Nodelet?
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 meditating upon the Monastery: (3)
As of 2023-05-28 02:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?