Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: FORMAT Trouble

by shmem (Chancellor)
on Jul 05, 2006 at 06:12 UTC ( [id://559255]=note: print w/replies, xml ) Need Help??


in reply to FORMAT Trouble

First thing to do, read perlform and perlvar :-)

Just select the format you like assigning to $~. Example:

#!/usr/bin/perl our(@l,$c); while(@l = getpwent) { $~ = $c++ % 2 ? 'foo' : 'bar'; write; } format foo = left @<<<<<<<<<<<< @<<<<<<<<<<<< $l[0],$l[7] . format bar = right @>>>>>>>>>>> @>>>>>>>>>>>> $l[0],$l[7] .
_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-29 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found