Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: using Backtick inside perl gives different output

by ig (Vicar)
on Oct 07, 2013 at 18:25 UTC ( [id://1057295]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my $offset = (split(/\s+/, (grep(/^\*/, `$cmd`))[0]))[8];
    
    print "$offset\n";
    
  2. or download this
    use strict;
    use warnings;
    ...
    my $offset = (split(/\s+/, $current_time_source))[8];
    
    print "$offset\n";
    
  3. or download this
    use strict;
    use warnings;
    ...
    die "$current_time_source: No offset" unless(defined($offset));
    
    print "$offset\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-26 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found