Re: [Perl-unix-users] validating (restricting) hash values and keys

2006-03-01 Thread $Bill Luebkert
listmail wrote: > #!/usr/bin/perl -w > use strict; > use warnings; > > my %hash = ( "acc12", 1, > "acc2", 0, > "acc3", '', > "una1", 1 ); > > $hash{acc3} = (); > > my $valid="acc1|acc2|acc3"; > > > > while (my ($key, $value) = each (%hash)) { >

[Perl-unix-users] validating (restricting) hash values and keys

2006-03-01 Thread listmail
#!/usr/bin/perl -w use strict; use warnings; my %hash = ( "acc12", 1, "acc2", 0, "acc3", '', "una1", 1 ); $hash{acc3} = (); my $valid="acc1|acc2|acc3"; while (my ($key, $value) = each (%hash)) { if ($key !~ $valid) { print

Antwort: RE: [Perl-unix-users] Using variables in a library path

2006-03-01 Thread Georg . Mavridis
Hi Peter, > > push @INC, "$BASE_PATH/scripts/common"; > > Doesn't this only work within a BEGIN {} block? No this works outside of beginblocks too -- but as use "statements" are executed at the same time with BEGIN {} blocks this statement wont affect them. (But it would be usefull to the requi

RE: [Perl-unix-users] Using variables in a library path

2006-03-01 Thread Peter Eisengrein
> push @INC, "$BASE_PATH/scripts/common"; Doesn't this only work within a BEGIN {} block? ___ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs