Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Buggy smartmatch on tied array?

by SankoR (Prior)
on Oct 05, 2013 at 16:13 UTC ( [id://1057045]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Tie::Array;
    tie my @array_t, 'Tie::StdArray';
    ...
    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
    Use of uninitialized value in pattern match (m//) at bugs.t line 6.
    Use of uninitialized value in pattern match (m//) at bugs.t line 6.
    ...
    plain grep:   1
    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: perlquestion [id://1057045]
Approved by NetWallah
Front-paged by NetWallah
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found