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

Re^3: Odd number of elements in anonymous hash

by tangent (Vicar)
on Jun 09, 2016 at 16:24 UTC ( #1165237=note: print w/replies, xml ) Need Help??


in reply to Re^2: Odd number of elements in anonymous hash
in thread Odd number of elements in anonymous hash

I didn't notice it was a string, thanks. So it could be done like this, though toolic's answer is cleaner.
my $attached = $code ? { attach_path => $file_name, attach_filename => + $file_name, attach_type => 'application/txt' } : {};

Replies are listed 'Best First'.
Re^4: Odd number of elements in anonymous hash
by Anonymous Monk on Jun 09, 2016 at 17:23 UTC
    Thanks for all the help, I like tangent's answer!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2022-05-24 19:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (84 votes). Check out past polls.

    Notices?