Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: $var{el} += 1 vs $var{el} = $var{el} + 1

by Anonymous Monk
on Aug 13, 2013 at 14:31 UTC ( #1049288=note: print w/replies, xml ) Need Help??


in reply to $var{el} += 1 vs $var{el} = $var{el} + 1

So, is there a reason (technically, best practice, etc) that I should not just use this format:

How big is your monitor? :)

FWIW, a best practice policy might outlaw $$fa{$fa}{$fb}{$fc}{$fa}{$fq}{$fp} or even $fa->{$fa}{$fb}{$fc}{$fa}{$fq}{$fp} and demand intermediates or even helpers

{ use Data::Diver qw/ Dive /; my $metric = Dive( $mainHash , $hashType , $regionID, 'MetricType' + ); my $cirtem = Dive( $metric, $$resultHash{Location} , $yearMonthDat +eList[$start] ); $cirtem += $$resultHash{Value}; }

If you make $mainHash an object it might collapse into

{ $mash->mertem( $mash->mertem + $value ); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1049288]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (1)
As of 2021-09-20 00:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?