Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Buggy smartmatch on tied array?

by kcott (Archbishop)
on Oct 05, 2013 at 18:00 UTC ( [id://1057055]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ cat junk
    #!/usr/bin/env perl
    ...
    print "plain grep:   " . (grep {/a/} @array) . "\n";
    print "tied smatch:  " . (/a/ ~~ @array_t) . "\n";
    print "tied grep:    " . (grep {/a/} @array_t) . "\n";
    
  2. or download this
    $ junk
    plain smatch: 1
    ...
    Use of uninitialized value in pattern match (m//) at ./junk line 12.
    tied smatch:  
    tied grep:    1
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-24 19:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found