Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Using SprintF in S & R

by afoken (Chancellor)
on Jul 11, 2017 at 20:37 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-25 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found