Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: URL Redirect

by Corion (Patriarch)
on Sep 07, 2016 at 06:52 UTC ( [id://1171295]=note: print w/replies, xml ) Need Help??


in reply to Re^3: URL Redirect
in thread URL Redirect

Maybe now is a good time to learn about Perl? See perlsyn for a basic overview of the syntax.

$res->header('Location') is a call to the header method of whatever class $res is in. It passes one parameter with the value Location.

While Perl has sigils and often these can be used in interesting ways, there are some restrictions on their use as you can't make things up and expect Perl to infer what you mean. Putting a @ before a reference, as in @$res tells Perl that you want to treat $res as an array. But, as Perl certainly has told you when you tried to run your code, $res does not behave like an array reference and hence Perl refused to do what you told it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-03-29 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found