Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Need to know on the differnece between the usgae of $st_mode and $'st_mode what does the single quote refer to

by Anonymous Monk
on Mar 26, 2010 at 12:04 UTC ( [id://831121] : note . print w/replies, xml ) Need Help??


in reply to Need to know on the differnece between the usgae of $st_mode and $'st_mode what does the single quote refer to

So is this the same case with &' and @' as well to access global function and global array respectively?
  • Comment on Re: Need to know on the differnece between the usgae of $st_mode and $'st_mode what does the single quote refer to

Replies are listed 'Best First'.
Re^2: Need to know on the differnece between the usgae of $st_mode and $'st_mode what does the single quote refer to
by Anonymous Monk on Mar 26, 2010 at 12:13 UTC
    No. ' is the name of the variable, and because you don't declare it, it is global, and because the current package is main, they are &main::' and @main::' respectively
    $ perl -le"print \@', \@{qq!main::'!}" ARRAY(0x979ff4)ARRAY(0x979ff4) $ perl -le"print &'" Undefined subroutine &main::' called at -e line 1.