Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: How to avoid "Use of uninitialized value" with printf?

by bobdabuilda (Beadle)
on Apr 11, 2012 at 02:46 UTC ( [id://964442]=note: print w/replies, xml ) Need Help??


in reply to Re: How to avoid "Use of uninitialized value" with printf?
in thread How to avoid "Use of uninitialized value" with printf?

Thanks for the response, Anon. One question for you - when in a position to not provide the original data you are working with... how, exactly, is one supposed to formulate a question?

I did what I thought was the best solution to this, which was to post up some working code, with an example of equivalent data, combined with an explanation of the symptoms I am seeing. The code snippet was kept the same as the original, aside from the lines I commented out (rather than simply deleting them, for visibility, in case there was an issue with the way those lines were being used).

Please tell me how I could have presented my question better/more clearly so that I can ensure I do so in future?

  • Comment on Re^2: How to avoid "Use of uninitialized value" with printf?

Replies are listed 'Best First'.
Re^3: How to avoid "Use of uninitialized value" with printf?
by Anonymous Monk on Apr 11, 2012 at 08:56 UTC

    Please tell me how I could have presented my question better/more clearly so that I can ensure I do so in future?

    :) Yeah, I probably should not have lead with that comment, not that I remember , nor can I even guess what I was referring to. Your question is very well presented (practically perfect). Mea culpa.

    Are you clear on the issue of the warning?

    Here is another way with Perl6::Form ( also documented at http://search.cpan.org/dist/Perl6-Doc/share/Exegesis/E07.pod ) based on demo_columns

    the more verbose version

    use Perl6::Form; print form {layout=>"across"}, '{:[{10}]:} {:[{10}]:} {:[{10}]:} {:[{10}]:} {:[{10}]:} {:[{10}]:} ', \@UACS , \@UACS , \@UACS , \@UACS , \@UACS , \@UACS ;

    or the same thing using the repeat operator

    use Perl6::Form; print form {layout=>"across"}, '{:[{10}]:} ' x 6 , ( \@UACS ) x 6;

    Place either right after  @UACS = sort(@UACS);, no splicing required, and @UACS remains full afterwards

      Ahhh alrighty, thanks for clearing that up... still new to posting here, so doing my best to get it right... always best to make it easier on the folks you're asking for help as possible, is my philosophy :D

      Also, thanks for the additional options... unfortunately, I'm not able to check those out, as I'm currently stuck with 5.8.8. Thankfully I have some other suggestions to work with once I get some more time to work on this one :)

        Ahhh alrighty, thanks for clearing that up...

        After some more consideration, it was probably a fleeting thought I had that sounded vaguely humorous, so I typed it up to see how it lies (how it plays), but forgot to remove it after typing up the rest of my post

        unfortunately, I'm not able to check those out, as I'm currently stuck with 5.8.8.

        :) Well, Perl6::Form does run on 5.8.8 ( see http://matrix.cpantesters.org/?dist=Perl6-Form+0.04 ) and Yes, even you can use CPAN, but I understand, I still rely on sprintf even though Perl6::Form is much friendlier than perlform

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found