![]() |
|
Do you know where your variables are? | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Because $r is being used as an object, by calling its send_http_header() and print() methods. Without the shift (I presume this is inside a subroutine), the object represented by the reference $r would never be referenced and the code would not work.
P.S., without seeing the context in which your example lives, it I do not exactly know what kind of object $r is , but from its method names, I suspect it's one of the Http::XXX'en. dmm If you GIVE a man a fish you feed him for a dayBut, TEACH him to fish and you feed him for a lifetime In reply to Re(2): what does shift do?
by dmmiller2k
|
|