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

Re: "use strict" and formats

by Joost (Canon)
on Mar 24, 2005 at 21:39 UTC ( #442203=note: print w/replies, xml ) Need Help??

in reply to "use strict" and formats

$~ should be set to the name of the format:
#!/usr/bin/perl -w use strict; my $text1 = "A"; my $text2 = "B"; format COLUMNS = @<<<<<<@>>>>>>> $text1,$text2 . $~ = "COLUMNS"; # note the quotes write;

Replies are listed 'Best First'.
Re^2: "use strict" and formats
by mrider (Beadle) on Mar 24, 2005 at 22:00 UTC

    Darn. I knew it had to be something simple that I was missing. I just couldn't find anything with any searches - presumably because the terms "use strict" and "format" are too general. Anyway, here's hoping that at least some other obsessive-compulsive person will be able to find my question and your answer.

    Thanks Joost!!

    (Update)FWIW, being a noob to this site (first post ever) I didn't realize it is somewhat of a faux pas to create a new post saying "thanks". Personally - I think one "thank you" lets the person which replied know that their answer was used. More than once I've posted replies (elsewhere), and had absolutely no idea whether the original poster even read my reply, never mind whether it worked or no. One way I suppose I can make this rambling cruft a bit more worthwhile is to humbly request a pointer to where the correct answer is documented, so that I don't have to ask silly questions like this again.

    (Update - Update)Found the thread regarding "perldoc" not too long after posting my first update (where I read about "thanks"). Too bad I didn't know about perldoc a bit sooner - my GoogleFoo wouldn't have taken such a beating. Thanks nonetheless schodckwm.

      Not a silly question...
          perldoc -f format

      But... (addressing silliness of not knowing) make yourself familiar with perldoc for general answers to similar questions. You may want to start with
          perldoc -h | more or
          perldoc perldoc and work from there.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://442203]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2018-06-19 03:18 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (111 votes). Check out past polls.