in reply to Re: zlib error
in thread zlib error
so perl fails when it tries to dereference the string
Interestingly, the code
my $package = "Compress::Zlib::"; print "$package defined\n" if defined %$package;
works fine with 5.8.8 (with strictures enabled), while 5.10.1 complains as shown in the OP...
Update: and with 5.12.0 you get
defined(%hash) is deprecated at ./835534.pl line 10. (Maybe you should just omit the defined()?)
...which also does work fine (with strictures) when you do so, i.e. when you write ... if %$package; nonsense (I had forgotten to comment out the no strict 'refs', which I had added in the meantime...) — in other words, for both 5.10 and 5.12 (but not 5.8) you do need the no strict 'refs', even without the deprecated defined %...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: zlib error
by ikegami (Patriarch) on Apr 19, 2010 at 17:18 UTC |