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

Re: Why does an undef argument in a join produce this warning?

by wfsp (Abbot)
on Apr 24, 2008 at 06:14 UTC ( [id://682563]=note: print w/replies, xml ) Need Help??

in reply to Why does an undef argument in a join produce this warning?

The second argument is not undef. The double quotes
says that you are trying to concatanate an undef value with, in this case, a space. That is what Perl is complaining about. Remove the quotes and the result is
nit: You don't need the quotes around the hash key either.

Replies are listed 'Best First'.
Re^2: Why does an undef argument in a join produce this warning?
by Anonymous Monk on Apr 24, 2008 at 06:23 UTC
    Thanks. you and chromatic were right
      You already have the solution for this case. If you ever have issues with unwanted warnings again, you should know that there can be specifically deactivated locally in the current scope.

      E.g. if you know that one function can cause this warning and the only way around would be massive use of if defined you can just say no warnings 'uninitialized'; to tell Perl that you don't want this specific warning inside the current scope, i.e. sub function or { } block, etc.

        Of course, in this case, the warning pointed to a bug...

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-07-14 13:40 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.