Thanks a lot for such a clear explanation. Now it all seems to fall in
place (: and obviously, obvious :).
- warm regards,
LFTLMFY (: Looking Forward To Learning More From You, that is :)
Atul
Michael Fowler <[EMAIL PROTECTED]>
09/20/01 01:02 PM
To: [EMAIL PROTECTE
I think you lost the context. My question is not whether %$$self and
%$self are same ( They are not and this was never a point of debate ). I
wanted just the explanation of using %$$self in the *** context of ***
autovivifying typeglobs. What I really don't understand is how to
interpret the %
Sorry, just posted to Jeff only.
Thanks for the answer but what I want to know is the meaning of %$$self. I
understand autovivification ( data structures spring into existence ).
However, the part I don't understand is %$$self. Shouldn't it be %$self? (
By the definition, you can always put a
Gurus,
The Camel ( 3rd Ed. ), says, on page 385-386
sub TIEHANDLE {
open my $self, $from, @_ or croak "can't open $from@_:$!";
}
and then,
" ... the my $self furnishes undefined scalar to open, which knows to
autovivify it into a typeglob. " and further mentions autovivify
Gurus,
The Camel, ( 3rd Ed. ), says,
-
$listref->[2][2] = "hello";# pretty clear
$$listref[2][2] = "hello"; # A bit confusing
This second of these statements may disconcert the C p
Dave> Well it's quite simple actually. A BLOCK of Perl code is a BLOCK of
Perl code.
Dave> No matter where you put it. Typically anything inside a set of {}'s
is a block
Dave> of code. So the fact that a subroutine consists of a block of code
Dave>
Dave> sub foo { BLOCK }
Dave>
Dave> and ma
Gurus,
perldoc -f map says,
-
map BLOCK LIST
map EXPR,LIST
Evaluates the BLOCK or EXPR for each element of LIST
(locally setting `$_' to each element
> "Mathew" == Mathew Hennessy <[EMAIL PROTECTED]> writes:
Mathew> Fair enough, though for truly oneoff stuff find |while read is
still my
Mathew> friend...
Mathew> find ./ -type f -name *.bak -mtime +30 |while read f; do echo
"removing
Mathew> [$f]"; rm -f $f; done
Mathew> (on solaris)
Ma
Hi gurus,
In http://www.cpan.org/doc/FMTEYEWTK/is_numeric.html, ( Is it a
number? ), Tom Christiansen writes:
--
If you do care about getting 0's, then do this:
do {
print "N
Gurus,
perldoc perlvar says:
$
Contains the subpattern from the corresponding set
of parentheses in the last pattern matched, not
counting patterns matched in nested blocks that have
been exited already. (Mnemonic: like \digits.)
my @sections = split /\n(?=[a-z])/i, $dat;
I have a doubt here. perldoc -f split says,
--
If the PATTERN contains parentheses, additional array
elements are created from each matching substring in the
delimiter.
split(/([,-])/, "1-10,2
11 matches
Mail list logo