using a string as a scalar under strict

2004-07-28 Thread bzzt
The followin code doesn't work if I use strict. Is the only solution not to use strict. #!/usr/local/bin/perl use strict; my $blues; $a = "blues"; $blues = "jazz"; print ${$a}; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

passing hashes form packages

2004-07-28 Thread bzzt
Hi, I am trying to pass a hash from a package to my script with the following. Can anyone tell me why it doesn't work? the_package.pm--- #!/usr/local/ActivePerl-5.6/bin/perl -w package the_package; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(%exp_hash); use WWW::Mechanize; u

Pattern matching line by line

2004-06-16 Thread bzzt
I'm trying to match a patern in a string but I want to do it a line at a time. Is there an easier way than this : while ($a =~ m/(.+?)\n/g ) { if ($1 =~ /whatever/g) { print "$1"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]