Hi Kenneth,

On Wednesday 31 Mar 2010 11:34:37 CHAN, KENNETH 1 [AG/7721] wrote:
> Hi all,
>   I have 2 simple questions (maybe be very trial):
> 1. I saw some code put "umask 022;" in the near beginning of perl
> script. I understand that umask is for changing the file permission in
> unix/linux. However, if I put "umask 002" in the beginning of a perl
> script, after execution, the file permission is not changed to 002. So
> what is the purpose of using this command in perl since it does not
> change the actual file permission?

Actually, the umask affects permissions of the files created in the future, 
such as with http://perldoc.perl.org/functions/open.html . See:

http://en.wikipedia.org/wiki/Umask

> 2. I tried the simple example in the GD.pm documentation:
> http://search.cpan.org/~lds/GD-2.35/GD.pm
> Perl shows me the errors on the line of "print $im->png;": Can't locate
> object method "png" via package "GD::Image" .....
> The perl version in the server is: v5.8.8
> What is the problem? And how should I debug it?
>   Thanks in advance.

Since the "use GD;" did not fail, I guess you have GD.pm but the GD 
distribution was not installed properly. The GD distribution should work on 
perl-5.8.8, although perl-5.8.8 is pretty old (and buggy). What is your OS, 
distro, how-did-you-install-perl, etc.? Maybe you've missed some C libraries 
when installing the GD distribution (such as libpng).

Regards,

        Shlomi Fish

> 
> Regards,
> Kenneth
> 

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Rethinking CPAN - http://shlom.in/rethinking-cpan

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to