Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: tr operator in eval -- updated

by BillKSmith (Monsignor)
on Sep 26, 2020 at 17:04 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11122242]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found