Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

(jjhorner) strip multiple spaces

by jjhorner (Hermit)
on Aug 01, 2000 at 04:49 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-03-28 16:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found