Thread IO::Uncompress::Gunzip und require() (4 answers)
Opened by bianca at 2015-12-07 07:59

bianca
 2015-12-07 11:13
#183168 #183168
User since
2009-09-13
6977 Artikel
BenutzerIn

user image
Aaah, sehr gut, danke dir! Wieder eine Variante die ich m. W. bisher nicht hatte.

Code:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;

require IO::Uncompress::Gunzip;
IO::Uncompress::Gunzip->import(qw(gunzip $GunzipError));
if (gunzip('x' => 'y')) {
}
else { die "gunzip failed: $GunzipError\n" }


Jetzt noch eine Winzigkeit Global symbol "$GunzipError" requires explicit package name at test.pl line 10.

Wie bekomme ich das hin? Hab vorher ein my $GunzipError und auch ein IO::Uncompress::Gunzip->import(my $GunzipError) versucht. Alles ohne Erfolg.
10 print "Hallo"
20 goto 10

View full thread IO::Uncompress::Gunzip und require()