Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: eval unexpected return value '1'

by shmem (Chancellor)
on Mar 29, 2008 at 09:13 UTC ( #677191=note: print w/replies, xml ) Need Help??


in reply to eval unexpected return value '1'

How come?

That's because your sub cadr returns 1 upon match, not the capture. Try

sub cadr { $_[0] =~ /\(\'(.*)\'\)/ and return $1 }

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: eval unexpected return value '1'
by ady (Deacon) on Mar 29, 2008 at 09:21 UTC
    Right you are !
    (I thought that was the gerenal area where the dog was burried, but couldn't quite locate it...)
    Tnx! Allan

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2022-10-07 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (30 votes). Check out past polls.

    Notices?