Skip to contentSkip to conversation

pom-ng new release

ANNOUNCE Jozsef Kadlecsik 1 participant 1 message May 4, 2004 1 message not in the archive netfilter

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 8 lines · Martijn Lievaart
Quoted 6 lines · Jozsef Kadlecsik
     [Could any Perl guru explain in plain English while the code

     for my $dep (@{$$patchlet{info}{depends}}) {
		$dep =~ s/^!//;
     }
Quoted 6 lines
Quoted 1 line

modifies the content of array $patchlet{info}{depends} too??]

Basic Perl actually, no guru knowledge needed. A for loop aliases the loop variable to the array element. Do a 'perldoc perlsyn' and look up foreach. As Patrick already noted, make a copy if you don't want this. I would use:

Ahh, yes, you are absolutely right! Thank you the explanation.

Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics

          H-1525 Budapest 114, POB. 49, Hungary