There is a third string format in which you may see a reference (any reference!) presented: the string interpolation of a "raw" (i.e., un-dereferenced) reference variable. (In this example, $blessed_ref has been bless-ed by default into the main package.)
(In this example, I have used the qq{text} form of the "text" operator because Windoze uses " (double-quote) as its command-line delimiter. See Quote and Quote-like Operators and Quote-Like Operators in perlop.)c:\@Work\Perl\monks>perl -wMstrict -le "use Scalar::Util qw(reftype) ;; my $blessed_ref = bless { 'foo' => 'bar' }; my $unblessed_ref = { 'bim' => 'bam' }; ;; print 'ref: ', ref $blessed_ref; print 'Scalar::Util::reftype: ', reftype $blessed_ref; ;; print qq{blessed stringization: $blessed_ref}; print qq{unblessed stringization: $unblessed_ref}; " ref: main Scalar::Util::reftype: HASH blessed stringization: main=HASH(0x1825f6c) unblessed stringization: HASH(0x1826098)
Give a man a fish: <%-{-{-{-<
In reply to Re: what is the variable type of $data = {
by AnomalousMonk
in thread what is the variable type of $data = {
by jimyokl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |