Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Buggy smartmatch on tied array?

by kcott (Bishop)
on Oct 05, 2013 at 18:00 UTC ( #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
Node Status?
node history
Node Type: note [id://1057055]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2021-01-27 23:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?