Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: FORMAT Trouble

by shmem (Chancellor)
on Jul 05, 2006 at 06:12 UTC ( #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? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2023-06-07 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (29 votes). Check out past polls.

    Notices?