Re: function umask() and problem in GD::image->png

2010-03-31 Thread Shlomi Fish
Hi Kenneth, On Thursday 01 Apr 2010 05:49:06 CHAN, KENNETH 1 [AG/7721] wrote: > Thanks Shlomi, it's clear to me about the umask() now. Nice. > Regarding the perl version, I am using the perl come with the Suse Linux > in my company. Will it be a big job to update the Perl and making sure > other

Re: What is the error in this code

2010-03-31 Thread Jim Gibson
At 10:59 PM -0400 3/31/10, Vincent Cannavale wrote: You should have the following at the beginning of your program so Perl will help you find the errors: use strict; use warnings; #open a text file for reading, since opening for writing wipes the file open(INFILE, " You should use the 3-arg

What is the error in this code

2010-03-31 Thread Vincent Cannavale
#open a text file for reading, since opening for writing wipes the file open(INFILE, ", "\n"); close(INFILE); open(OUTFILE, ">perlfile.txt"); $variable =~ s/0/zero/g ; $variable =~ s/1/one/g ; $variable =~ s/2/two/g ; $variable =~ s/3/three/g ; $variable =~ s/4/four/g ; $variable =~ s/5/five/g ;

RE: function umask() and problem in GD::image->png

2010-03-31 Thread CHAN, KENNETH 1 [AG/7721]
Thanks Shlomi, it's clear to me about the umask() now. Regarding the perl version, I am using the perl come with the Suse Linux in my company. Will it be a big job to update the Perl and making sure other installed modules (dependencies) working fine? Can you please guide me to some good resources

Re: Perl appears to be introducing whitespace when reading .txt files

2010-03-31 Thread Doug Cacialli
Thanks for everyone's patience and continued help. The full script in its current form is below: #!/usr/bin/perl use strict; use warnings; use IO::File; #The program should prompt the user to specify the path where the #subject directories reside. print "\nPlease specify the path to where the c

Unicode::Collate string replacements and whitespace

2010-03-31 Thread Frank Müller
dear all, I'm making some string replacements with Unicode::Collate which generally works fine but for whitespace. I have the following simple code (adopted from the module documentation): my $myCollator = Unicode::Collate->new( normalization => undef, level => 1 ); my $str = "Camel donkey zebra c

RE: Connecting to a socket

2010-03-31 Thread walt
Hi Rene, You are absolutely right. I don't intend to re-invent the wheel. This is a learning curve for me. I would like to understand the ins and outs of smtp better. I have used net::smtp before and its great. But I cannot figure out how to get the module to return server messages so I can s

Re: Connecting to a socket

2010-03-31 Thread Rene Schickbauer
walt wrote: Thanks Rene, I already have an SMTP server running and have been using it with ASP and CDOSYS. Works like a charm but it's a bit cumbersome and restrictive. So I am looking into dynamically generating emails from a database to achieve a more personalized presentation. At the same t

Re: hv_store hoh

2010-03-31 Thread Shlomi Fish
On Wednesday 31 Mar 2010 18:36:43 Patrick Dupre wrote: > Hello, > > How can I store in a hash (HV) another hash bu using XS ? > Please ask it on the XS mailing list: perl...@perl.org (and perl-xs-subscr...@perl.org , etc.). XS is considered very advanced Perl and most experienced Perl program

RE: Connecting to a socket

2010-03-31 Thread Bob McConnell
From: Rene Schickbauer > walt wrote: >> I am new to Perl and want to connect to an smtp server on port 25 and then >> send it the helo, mail from:, rcpt to:, data, commands but I would also like >> to evaluate the response from the smtp server. >> >> Has anyone got a script or can point me in the

hv_store hoh

2010-03-31 Thread Patrick Dupre
Hello, How can I store in a hash (HV) another hash bu using XS ? Thanks. -- --- == Patrick DUPRÉ | | Department of Chemistry| |Phone: (44)-(0)-1904-434384 The University of York

Re: Where is the error

2010-03-31 Thread Rene Schickbauer
Harry Putnam wrote: "Uri Guttman" writes: [...] . . . . . . . . . . . . . . . . . . . . . . . . . . . . but it all starts in your head. a disorganized mind can't ever be a good coder. I may be in deep do do here... Don't worry if you feel like bashing your head against a wall sometimes.

Re: Connecting to a socket

2010-03-31 Thread Rene Schickbauer
walt wrote: Hi, I am new to Perl and want to connect to an smtp server on port 25 and then send it the helo, mail from:, rcpt to:, data, commands but I would also like to evaluate the response from the smtp server. Has anyone got a script or can point me in the right direction? A simple examp

Re: 回复:Re: How to process with Active Director y in windows from perl

2010-03-31 Thread Bob goolsby
Yes. Net::LDAP provides a rich tool-kit for managing and manipulating LDAP directories. You will have to write some code to provide the specifics of your implementation, but all of the routines you need are there. 2010/3/31 xufengnju : > Hi, > > Net::LDAP is a great tool to access Active Dire

RE: Where is the error

2010-03-31 Thread Bob McConnell
From: Harry Putnam > "Uri Guttman" writes: > > [...] > >> . . . . . . . . . . . . . . . . . . . . . . . . . . . . but it >> all starts in your head. a disorganized mind can't ever be a good >> coder. > > I may be in deep do do here... > Aren't we all? Bob McConnell -- To unsubscribe, e-ma

RE: Connecting to a socket

2010-03-31 Thread walt
Thanks Deborah, That's works fine on my local smtp relay server. But.. how can I get the script to check the server response after issuing the $smtp->to $var ? I want to trap any rejections by the server. Meantime I'll see if I can find documents on Net::SMTP Thanks again, Walter

Re: Connecting to a socket

2010-03-31 Thread Jeff Peng
On Wed, Mar 31, 2010 at 9:39 PM, walt wrote: > Hi, > > I am new to Perl and want to connect to an smtp server on port 25 and then > send it the helo, mail from:, rcpt to:, data, commands but I would also like > to evaluate the response from the smtp server. > > Has anyone got a script or can point

Re: Where is the error

2010-03-31 Thread Harry Putnam
"Uri Guttman" writes: [...] > . . . . . . . . . . . . . . . . . . . . . . . . . . . . but it > all starts in your head. a disorganized mind can't ever be a good > coder. I may be in deep do do here... Thanks for all your input. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Connecting to a socket

2010-03-31 Thread walt
Hi, I am new to Perl and want to connect to an smtp server on port 25 and then send it the helo, mail from:, rcpt to:, data, commands but I would also like to evaluate the response from the smtp server. Has anyone got a script or can point me in the right direction? I know I could use mailman or

Re: Syntax of Foreach loop

2010-03-31 Thread Shawn H Corey
On Tue, 30 Mar 2010 23:05:00 -0600 Jon Forsyth wrote: > I am truly a beginner. Could someone help me understand this syntax > out of a code example from "Learning Perl"? On line 5 I'm confused > as to why "my $number" is between "foreach" and the ()? is "my > $number part of the loop? Yes, it

Re: Perl appears to be introducing whitespace when reading .txt files

2010-03-31 Thread Doug Cacialli
Thank you all for your outpouring of support!! I'll post the full code when I finish up with work late this afternoon, as well as implement the suggestions I received. We are a little closer to solving this, and my novice impression (disclaimer: I've been using perl less than a month) is that thi

Re: perlcc, par, another ?

2010-03-31 Thread Eduardo Terzella
Look with using PAR. pp -o testeC teste.pl teste.pl #!/usr/bin/perl print "Hello World\n"; Size file: teste.pl => 4.0 k testeC => 3.6 M This is very strange, too increases the size of the file. You know tell me why ? And thanks for information perlcc i will trie to use it.

Re: 回复:Re: How to process with Active Directory in windows from perl

2010-03-31 Thread xufengnju
Hi, Net::LDAP is a great tool to access Active Directory in Windows Server from perl. I am done with it. 2010-03-31 xufengnju 发件人: XUFENG 发送时间: 2010-03-30 21:11:59 收件人: Shlomi Fish; beginners 抄送: xufengnju 主题: 回复:Re: How to process with Active Directory in windows from perl Hi,

Re: Strange behavior with POSIX qw(fpathconf)

2010-03-31 Thread Bob goolsby
Post this on Perl Monks (http://perlmonks.org/) for non-beginner feed back, Old Gray Bear On Tue, Mar 30, 2010 at 2:38 PM, Paul Smith wrote: > I have a feeling this is not a "beginners" question (I've been hacking > in Perl for many years and UNIX systems for far longer) but it seems my > choice

Re: Perl appears to be introducing whitespace when reading .txt files

2010-03-31 Thread Dr.Ruud
Doug Cacialli wrote: V e r y t r u l y y o u r s , Looks like UTF-16 to me. -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Strange behavior with POSIX qw(fpathconf)

2010-03-31 Thread Paul Smith
I have a feeling this is not a "beginners" question (I've been hacking in Perl for many years and UNIX systems for far longer) but it seems my choices are this list, or perl5-porters which also doesn't seem right. Isn't there any list where non-beginner questions can be asked? Anyway. I have a Pe

Re: perlcc, par, another ?

2010-03-31 Thread Eduardo Terzella
Look ... I have a daemon with Daemon::Generic. When run: *linux-2xqo:~ # ./testebackup.pl start* *Starting teste server* * * *linux-2xqo:~ # ./testebackup.pl stop* *Killing 14188* Daemon works fine. But when compile using perlcc, perlcc -B daemon.pl -o daemon and run, dont work more. *linux-2

Re: perlcc, par, another ?

2010-03-31 Thread eterzella
On 29 mar, 10:23, eterze...@gmail.com (eterzella) wrote: > Good morning, > > I used the perlcc to compile my perl scripts. In version 5.10 I can no > longer > use, I indicated the PAR to the compilation, put the files when > compiled with the PAR are very large. > > This is normal when using the PA

Re: function umask() and problem in GD::image->png

2010-03-31 Thread John W. Krahn
CHAN, KENNETH 1 [AG/7721] wrote: Hi all, Hello, 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. No, that is incorrect. umask() by itself d

Re: error while installing win32::Registry module

2010-03-31 Thread Alan Haggai Alavi
Hi, > Can't locate Win32/Registry.pm in @INC (@INC contains: > C:/strawberry/perl/lib C: > /strawberry/perl/site/lib C:\strawberry\perl\vendor\lib .) at GETIP.pl line > 1. > BEGIN failed--compilation aborted at GETIP.pl line 1. It means that perl is unable to find the module Win32::Registry. So,

Re: function umask() and problem in GD::image->png

2010-03-31 Thread Shlomi Fish
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. H

function umask() and problem in GD::image->png

2010-03-31 Thread CHAN, KENNETH 1 [AG/7721]
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

Re: Compress a PNG File using PerlMagick

2010-03-31 Thread Christoph Friedrich
Arg sry forgott to tell you that I use PerlMagick (Image Magick Library) Christoph Friedrich schrieb: Hello there, I currently try to write an image to a png file with compression. But it seems not to compress the image after all. The original filesize of the image is 132,2 kb and when I try

AW: Perl appears to be introducing whitespace when reading .txt files

2010-03-31 Thread Thomas Bätzler
Doug Cacialli wrote: > I'm completely baffled by this and not entirely sure where to start. > > I have a plain text file, testfile.txt, which contains a single line: Could this be an encoding issue? How big is that file? Larger than 18 or 19 bytes? If yes, http://perldoc.perl.org/perlunicode

Re: Perl appears to be introducing whitespace when reading .txt files

2010-03-31 Thread Shlomi Fish
On Wednesday 31 Mar 2010 10:35:55 Owen wrote: [SNIP] > Hi, > > I think you are making this all too complicated. All that is needed is > the script below. If you have a file > Well, his approach of using IO::File is not incorrect. He seems to encounter a strange bug and we should try to isolate

Re: Perl appears to be introducing whitespace when reading .txt files

2010-03-31 Thread Owen
> I'm completely baffled by this and not entirely sure where to start. > > I have a plain text file, testfile.txt, which contains a single line: > > Very truly yours, > > It is written exactly how you see it above, with a newline at the end. > > I'm trying to write a script that will determine th

Re: Perl appears to be introducing whitespace when reading .txt files

2010-03-31 Thread Shlomi Fish
Hi Doug, On Wednesday 31 Mar 2010 07:55:25 Doug Cacialli wrote: > I'm completely baffled by this and not entirely sure where to start. > > I have a plain text file, testfile.txt, which contains a single line: > > Very truly yours, > > It is written exactly how you see it above, with a newline

AW: AW: Syntax of Foreach loop

2010-03-31 Thread Thomas Bätzler
Uri Guttman wrote: > > "TB" == Thomas Bätzler writes: > TB> with the -w switch or the "use warnings;" pragma which requires > TB> variables to be declared before their first use. > > that is the use strict pragma, not the warnings one. Of course. I knew I shouldn't have posted befor