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

Re^2: Using SprintF in S & R

by afoken (Canon)
on Jul 11, 2017 at 20:37 UTC ( #1194868=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    my $foo='look! no eval: 3735928559';
    $foo=~s/(\d+)/$X{sprintf '0x%08X',$1}/;
    print $foo;
    
  2. or download this
    >perl eval.pl
    look! no eval: 0xDEADBEEF
    >
    
  3. or download this
    #!/usr/bin/perl
    
    ...
    my $foo='look! no eval: 3735928559';
    $foo=~s/(\d+)/${[sprintf '0x%08X',$1]}[0]/;
    print $foo;
    
  4. or download this
    >perl eval2.pl
    look! no eval: 0xDEADBEEF
    >
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2022-05-16 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (63 votes). Check out past polls.

    Notices?