Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: redirect stdout into hash

by zentara (Archbishop)
on Jun 13, 2012 at 19:48 UTC ( [id://976055]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # make a global array for storage
    my @array;
    ...
           # or use a concated string
            $storage_string .= $buf;   # concantates $buf onto end of stri
    +ng
        }
    
  2. or download this
    $/ = '';  # change output separator to nothing instead of newline
    print   @array, "\n";
    
  3. or download this
    my @lines=split( /\n/, $storage_string);
    print "@lines\n";
    ...
    # or since $storage_string contains embedded newlines, just printing i
    +t would work
    print "$storage_string\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-23 21:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found