Re: Reg. Directory listing program

2008-06-04 Thread John W. Krahn
Wagner, David --- Senior Programmer Analyst --- WGO wrote: From: Wagner, David --- Senior Programmer Analyst --- WGO From: Gunwant Singh [mailto:[EMAIL PROTECTED] 9 print "$file\t$perm\n"; Then change print to printf "$file %04o\n", $perm; Better to do it this way:

Re: Passing Argument to a Perl Module Function

2008-06-04 Thread Chas. Owens
On Wed, Jun 4, 2008 at 9:13 PM, KELVIN PHILIP <[EMAIL PROTECTED]> wrote: snip > my $var = MyModule::PrintMe-> new($name); snip > With this program, when I execute the main, it was not printing "John"; > instead it was printing "MyModule::PrintMe" snip When you call a function with -> the item on t

Passing Argument to a Perl Module Function

2008-06-04 Thread KELVIN PHILIP
Hi, Will you please explain how to pass an argument to a subfunction defined in a perl module? This is wahat i had tried; please correct me if I am wrong. *Main:* use MyModule::PrintMe; $name = "John"; my $var = MyModule::PrintMe-> new($name); *Module: *package MyModule::PrintMe; use Export

Re: Count messages in a Imap-Mailfolder

2008-06-04 Thread John W. Krahn
Michelle Konzack wrote: Hello John, Hello, thank you for your answer. You're welcome. Am 2008-06-02 17:34:30, schrieb John W. Krahn: According to the documentation for that module: list my $message_size = $imap->list($message_number); my $mailbox_sizes = $imap->

Re: Count messages in a Imap-Mailfolder

2008-06-04 Thread Gunnar Hjalmarsson
Michelle Konzack wrote: Am 2008-06-02 17:34:30, schrieb John W. Krahn: According to the documentation for that module: list my $message_size = $imap->list($message_number); my $mailbox_sizes = $imap->list; This method returns size information for a message, as

Re: Count messages in a Imap-Mailfolder

2008-06-04 Thread Michelle Konzack
Hello John, thank you for your answer. Am 2008-06-02 17:34:30, schrieb John W. Krahn: > According to the documentation for that module: > > list > my $message_size = $imap->list($message_number); > my $mailbox_sizes = $imap->list; > > This method returns size in

Re: Reg. Directory listing program

2008-06-04 Thread John W. Krahn
Gunwant Singh wrote: Hi, Hello, I am new to this mailing list and I am very new to PERL. perldoc -q "What.s the difference between .perl. and .Perl.?" So, please bear with me for my questions. I wrote a code that lists files in a directory with the permissions. I am coding for MS-Windows

RE: Reg. Directory listing program

2008-06-04 Thread Wagner, David --- Senior Programmer Analyst --- WGO
> -Original Message- > From: Wagner, David --- Senior Programmer Analyst --- WGO > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 04, 2008 11:08 > To: Gunwant Singh; beginners@perl.org > Subject: RE: Reg. Directory listing program > > > -Original Message- > > From: Gunwant Sin

RE: Reg. Directory listing program

2008-06-04 Thread Wagner, David --- Senior Programmer Analyst --- WGO
> -Original Message- > From: Gunwant Singh [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 04, 2008 10:02 > To: beginners@perl.org > Subject: Reg. Directory listing program > > Hi, > > I am new to this mailing list and I am very new to PERL. So, > please bear > with me for my question

Reg. Directory listing program

2008-06-04 Thread Gunwant Singh
Hi, I am new to this mailing list and I am very new to PERL. So, please bear with me for my questions. I wrote a code that lists files in a directory with the permissions. I am coding for MS-Windows. Here is my code: *1 use strict; 2 use warnings; 3 use File::stat(); 4 5 opendir (DH, "subcode") o

Re: Parsing HTML file

2008-06-04 Thread Pat Rice
Hi try html trees on cpan there is also html tables, but I haven't used it. Trees can take a while to understand but it seems to be pretty good. Pat On Mon, Jun 2, 2008 at 12:10 PM, Jeff Peng <[EMAIL PROTECTED]> wrote: > On Mon, Jun 2, 2008 at 5:56 PM, Purohit, Bhargav > <[EMAIL PROTECTED]> wro

Re: Regex advice

2008-06-04 Thread Rob Dixon
John W. Krahn wrote: > Steve Bertrand wrote: >> Hi everybody, > > Hello, > >> I am far from a regex guru, so I know that I can get advice on how to >> learn to improve my regex knowledge so I can better my currently working >> code to protect against failure in the future. I would appreciate so

Re: Regex advice

2008-06-04 Thread Steve Bertrand
What I mean is, if you were to use a regex as opposed to using split(), how would you have written: if (/.*simscan~\[\d+\]~([\w|\s]+).*?~(\d+\.\d+)s~.*?~(.*?)~(.*?)~(.*)/) { ...to do the task I originally requested help with? Aside from removing .* at the beginning and removing '|' from the

Re: creating simaltaneous threads

2008-06-04 Thread Rob Dixon
perl pra wrote: > > I want to create 100 threads/processes simaltaneoulsy (at the same time), > and those 100 threads/processes should execute a subrountine at the same > time. > > can anybody help me giving some ideas reagarding this, I tried creating this > 100 process using fork in a for l

Re: sprintf format question

2008-06-04 Thread Rob Dixon
April wrote: > sprintf( "%s%$Fmt%s", ("%$Fmt=|", $TestStr, "|")) > > This is in Perl for Dummies, 4th ed, p160. > > I'm trying to understand this ... > > the first part, "%s%$Fmt%s", my understanding is the format part, > which specifies the formats for the second part, thelist part, ("% > $Fmt=

creating simaltaneous threads

2008-06-04 Thread perl pra
hi gurus, I want to create 100 threads/processes simaltaneoulsy (at the same time), and those 100 threads/processes should execute a subrountine at the same time. can anybody help me giving some ideas reagarding this, I tried creating this 100 process using fork in a for loop but that does no

sprintf format question

2008-06-04 Thread April
sprintf( "%s%$Fmt%s", ("%$Fmt=|", $TestStr, "|")) This is in Perl for Dummies, 4th ed, p160. I'm trying to understand this ... the first part, "%s%$Fmt%s", my understanding is the format part, which specifies the formats for the second part, thelist part, ("% $Fmt=|", $TestStr, "|"): %s for "%$F