> $ perl -le'
> sub foo {
> for ( @_ ) {
> tr/a-z/A-Z/
> }
> }
> my @a = qw/ a b c d e f g h i j /;
> print "@a";
> foo @a;
> print "@a";
> my %h = qw/ a b c d e f g h i j /;
> print "@{[ %h ]}";
> foo %h;
> print "@{[ %h ]}";
> '
> a b c d e f g h i j
> A B C D E F G H I J
On Sat, 2006-15-04 at 14:34 -0700, John W. Krahn wrote:
> Actually it will effect the values of the hash but not the keys:
>
> $ perl -le'
> sub foo {
> for ( @_ ) {
> tr/a-z/A-Z/
> }
> }
> my @a = qw/ a b c d e f g h i j /;
> print "@a";
> foo @a;
> print "@a";
> my %h = q
Mr. Shawn H. Corey wrote:
> On Sat, 2006-15-04 at 09:32 -0400, Steve Bertrand wrote:
>>Just out of curiosity, if you pass the hash, won't it create a 'copy' of
>>the original, manipulate it so that in the end you may have two
>>different versions (modifications) of the same hash?
>>
>>As I underst
On Sat, Apr 15, 2006 at 06:09:04AM -0700, John W. Krahn wrote:
> Chad Perrin wrote:
> > On Fri, Apr 14, 2006 at 12:18:33PM -0400, Brian Volk wrote:
> >>I'm working through the exercises in the Alpaca book. I don't
> >>understand why you have to pass the check_items_for_all subroutine a
> >>referen
On Sat, 2006-15-04 at 09:32 -0400, Steve Bertrand wrote:
> Just out of curiosity, if you pass the hash, won't it create a 'copy' of
> the original, manipulate it so that in the end you may have two
> different versions (modifications) of the same hash?
>
> As I understand it, if you pass a href,
> > I'm working through the exercises in the Alpaca book. I don't
> > understand why you have to pass the check_items_for_all
> subroutine a
> > reference to a hash. Why can't you just pass it the hash itself...
> > check_items_for_all(%all) instead for (\%all) ? Could someone pls
> > expla
Brian Volk wrote:
> Hi All,
Hello,
> I'm working through the exercises in the Alpaca book. I don't
> understand why you have to pass the check_items_for_all subroutine a
> reference to a hash. Why can't you just pass it the hash itself...
> check_items_for_all(%all) instead for (\%all) ? Could
Chad Perrin wrote:
> On Fri, Apr 14, 2006 at 12:18:33PM -0400, Brian Volk wrote:
>>I'm working through the exercises in the Alpaca book. I don't
>>understand why you have to pass the check_items_for_all subroutine a
>>reference to a hash. Why can't you just pass it the hash itself...
>>check_item
On Fri, Apr 14, 2006 at 12:18:33PM -0400, Brian Volk wrote:
>
> I'm working through the exercises in the Alpaca book. I don't
> understand why you have to pass the check_items_for_all subroutine a
> reference to a hash. Why can't you just pass it the hash itself...
> check_items_for_all(%all) in
On Fri, 14 Apr 2006, Brian Volk wrote:
>
>
> I'm working through the exercises in the Alpaca book. I don't
> understand why you have to pass the check_items_for_all subroutine a
> reference to a hash. Why can't you just pass it the hash itself...
> check_items_for_all(%all) instead for (\%all
10 matches
Mail list logo