Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: tr operator in eval

by pgmer6809 (Sexton)
on Sep 26, 2020 at 03:54 UTC ( #11122229=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        
        # this next two step works..... 
        $xtr = "$bad =~ tr/$card//;" ;
        $kards = eval "$xtr;";
            print "xtr kards = $kards from eval cmd : $xtr\n";
        #output: xtr kards = 5 from eval cmd : AKQJT98765432KKKK =~ tr/K//
    +;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2023-02-05 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (31 votes). Check out past polls.

    Notices?