Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: perlform ^* variable field length

by Not_a_Number (Prior)
on Apr 28, 2015 at 08:01 UTC ( [id://1124966]=note: print w/replies, xml ) Need Help??


in reply to Re^4: perlform ^* variable field length
in thread perlform ^* variable field length

This seems to be exactly what you posted in Re^2: perlform ^* variable field length. You were asked to clarify, not repeat yourself.

What I don't understand, for example, is why the second line in your "desired result" should be:

col2:line2||||col5:line2|col6:line2

rather than:

|col2:line2|||col5:line2|col6:line2

Replies are listed 'Best First'.
Re^6: perlform ^* variable field length
by Anonymous Monk on Apr 28, 2015 at 08:20 UTC

    yes, you are correct, there was typo in that reply

    here's the corrected array

    ('col1 : line1 col1 : line2', 'col2 : line1', 'col3 : line1', 'col4 : line1', 'col5:line1 col5:line2', 'coll6 : line1 coll6 : line2 coll6 : line3 coll6 : line4' );

    and corrected desired result

    col1:line1|col2:line1|col3:line1|col4:line1|col5:line1|col6: line1 col1:line2||||col5:line2|col6:line2 |||||col6:line3 |||||col6:line4

    I think, you got how I want to print the content of array. Going by the perlform doc and using ^* alongwith ~~ the format string I'm using should work, but it throws Out of Memory Error!.

    or is there any other way i can get the desired result.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-25 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found