Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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] ]


Comment on Re^3: removing square brackets
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-08-22 23:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (168 votes), past polls