Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Rethrowing with die $@ considered harmful (local $_ buggy)

by ikegami (Patriarch)
on Jul 18, 2006 at 06:05 UTC ( [id://561931]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub dequote {
       local $_ = @_ ? $_[0] : $_;
    ...
       s/\\(.)/$1/g;
       return $_;
    }
    
  2. or download this
    use strict;
    use warnings;
    ...
    
    print dequote, "\n"
       foreach $var;
    
  3. or download this
    STORE "John \"Foo\" Bar"
    FETCH
    ...
    FETCH
    STORE
    Use of uninitialized value in print at 561931.pl line 25.
    
  4. or download this
    use strict;
    use warnings;
    ...
    dequote('"John \"Foo\" Bar"');
    
    print(pos(), "\n");
    
  5. or download this
    2
    Use of uninitialized value in print at 561931.pl line 18.
    
  6. or download this
    2
    2
    
  7. or download this
    sub dequote {
      #local $_ = @_ ? $_[0] : $_;   # XXX
    ...
       s/\\(.)/$1/g;
       return $_;
    }
    
  8. or download this
    STORE "John \"Foo\" Bar"
    FETCH
    John "Foo" Bar
    
  9. or download this
    2
    2
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-03-28 13:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found