Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: removing square brackets

by softworkz (Monk)
on Oct 20, 2005 at 23:42 UTC ( #501849=note: print w/replies, xml ) Need Help??


in reply to Re^2: removing square brackets
in thread removing square brackets

I agree with kwaping, I would use tr/// for this solution.
#!/usr/bin/perl -w use strict; while (<DATA>) { chomp; tr/[]//d; $_ = join(" ",split " ", $_); print "$_\n"; } __DATA__ [ [ 0.039543323] [ 0.068993981] [ 0.086558227] [ 0.12252527] [ 0.14724698] [ 0.16631099] [ 0.18877556] [ 0.20234162] [ 0.18110326] [ 0.13155017] [ -4.0316574] [ -3.6178487] [ -3.1186917] ]

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://501849]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2016-12-09 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (153 votes). Check out past polls.