Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: A Wayward Variable

by Pancho (Pilgrim)
on Mar 26, 2008 at 17:12 UTC ( [id://676469]=note: print w/replies, xml ) Need Help??


in reply to A Wayward Variable

Just remove the curlies in

my ($filename, undef, $ext) = fileparse($originalImage, qr({\..*}));

this will give .ext for extension

So to clarify... I think your issue is with the pattern you are using to match what will populate $ext

Pancho

Replies are listed 'Best First'.
Re^2: A Wayward Variable
by kalchas (Acolyte) on Mar 26, 2008 at 18:48 UTC
    Kalchas here, the Anonymous Monk who posted this post, now logged in. Removing the braces did the trick: thanks for your help, Pancho! Also, I benefited from the catch on the missing close paren on the if statement. Thanks for the super-quick help!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-07-25 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    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.