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

Re: tr operator in eval -- updated

by BillKSmith (Prior)
on Sep 26, 2020 at 17:04 UTC ( #11122242=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    $kards = eval "\$bad =~ tr/$card//";
    ok($kards == 5, "Combined form");
    
  2. or download this
    1..3
    ok 1 - string = '$bad =~ tr/K//'
    ok 2 - Number of K's in AKQJT98765432KKKK is 5
    ok 3 - Combined form
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2021-06-17 06:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (83 votes). Check out past polls.

    Notices?