Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: system function not handling string properly

by McA (Curate)
on Sep 06, 2013 at 21:02 UTC ( #1052768=note: print w/ replies, xml ) Need Help??


in reply to system function not handling string properly

Hi,

what's about simply inserting a

print Dumper($link);

to show us what you get from the database?

McA


Comment on Re: system function not handling string properly
Download Code
Re^2: system function not handling string properly
by hermes1908 (Novice) on Sep 06, 2013 at 21:19 UTC
    The script includes a print statement for this purpose. The print statement prints the contents of $link correctly, but system("echo", $link) only prints w. If you download the sample file I included and put it in the same directory of the script you can see the result yourself.

      Excuse me, I've overlooked that line.

      What is your OS? What shows 'which echo' on your system?

      This code works pretty well on my system:

      #!/usr/bin/env perl use strict; use warnings; use 5.010; my $url = '"www.youtube.com/watch?v=mark"'; system('echo', $url); $url = "www.youtube.com/watch?v=mark"; system('echo', $url);

      McA

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (13)
As of 2014-09-03 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls