Re: basic explanation on code

2004-02-14 Thread Wiggins d'Anconia
Please bottom post Eternius wrote: i agree with you, but for the sake of read - a - bility I would have defined the vars here (<---) as they are valid for whole package anyway and not just for test1(); But again you have changed the meaning, if you are going to declare them as package variab

RE: basic explanation on code

2004-02-14 Thread Eternius
i agree with you, but for the sake of read - a - bility I would have defined the vars here (<---) as they are valid for whole package anyway and not just for test1(); use strict; local $a = 1; <--- local $aa = 2; <--- test1(); sub test1 { test2(); } sub test2 { print "a = $a\n"; prin

RE: basic explanation on code

2004-02-14 Thread Jan Eden
Ronen Kfir wrote: >If I get you correctly the %supliers hash will look like this in this >script: >%supliers =(booboo =>'1', > Puter =>'1', > Synta => 'defined') > or am I wrong. I need to see the real print of this hash in order to >understand it... > Not exactly, all ke

RE: basic explanation on code

2004-02-13 Thread Ronen Kfir
To: Ronen Kfir; Perl Lists Subject: RE: basic explanation on code Hi, Ronen Kfir wrote: >Hi Jan, >I am sorry... > >This is the right code: > > >#!/usr/bin/perl > >%machines =(user1, 'booboo', >user2, 'puter', > user3, 'synta

RE: basic explanation on code

2004-02-13 Thread Jan Eden
Hi, Ronen Kfir wrote: >Hi Jan, >I am sorry... > >This is the right code: > > >#!/usr/bin/perl > >%machines =(user1, 'booboo', >user2, 'puter', > user3, 'synta', >user4, 'synta'); > > for (keys %machines) > { >$val=$machines{$_}; > if (!defined $supliers{$va

Re: basic explanation on code

2004-02-13 Thread Jan Eden
Hi, Ronen Kfir wrote: >#!/usr/bin/perl > > >%machines =(user1, 'booboo', >user2, 'puter', > user3, 'synta', > user4, 'synta'); > > for $key (keys %machines) > { >$val=$programs{$key} >if (!defined $supliers{$val}) >{ >$supliers{$va