Suppose I have:
my $enter = `curl -s "http://google.com"`;
Would it be possible to read $enter
as a string as well? On top of running the curl function, I am trying to read it as a string so I can pull the website name (google.com)
Suppose I have:
my $enter = `curl -s "http://google.com"`;
Would it be possible to read $enter
as a string as well? On top of running the curl function, I am trying to read it as a string so I can pull the website name (google.com)
No, the text inside the backticks is not made available in a variable. But there is nothing stopping you from putting it in a variable of your own and executing that string:
my $cmd = 'curl -s "http://google.com"';
my $enter = `$cmd`;