Cool construct

2004-07-06 Thread Bryan Harris
I found this construct in the Perl Cookbook: $Current_Screen = param(".State") || "Default"; I thought it was really cool because if the value of param(".State") comes back undefined, the $Current_Screen variable gets set to "Default". So the other day I wanted to do something similar: @somea

RE: Split the line with "|" character

2004-07-06 Thread suresh.pasupula
Hi, Try using in the following way, $DELIM_PIPE = '|'; @data = split /[$DELIM_COMMA]/,$line; or @data = split /['|']/,$line; Regards Suresh -Original Message- From: Wil [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 07, 2004 2:39 AM To: [EMAIL PROTECTED] Subject: Split the line with

Re: Please explain what this code does

2004-07-06 Thread Andrey Demenev
Gunnar Hjalmarsson wrote: Andrey Demenev wrote: This is code from Mail::DeliveryStatus::BounceParser @error_lines = (grep { /\S/ } grep { ! /error detail/i } grep { /message.*not delivered to the following/i .. /error detail/i } split /\n/, $er

Re: Associative arrays of associative arrays

2004-07-06 Thread Gunnar Hjalmarsson
Philip Tham wrote: Is is possible to have an associative array where the key is a string and value is another associative array. Almost. The value needs to be a *reference to* another hash. perldoc perlreftut If so, How do I use it. perldoc perldsc -- Gunnar Hjalmarsson Email: http://www.g

Associative arrays of associative arrays

2004-07-06 Thread Tham, Philip
Is is possible to have an associative array where the key is a string and value is another associative array. If so, How do I use it. Philip -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: output

2004-07-06 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: my goal will look like this: -w 'barcode="E00085" or barcode="E00086" or barcode="E00096" or barcode="E00184" -w 'barcode="E00293" or barcode="E00351" or barcode="E00524" or barcode="E00584" -w 'barcode="E00587" or barcode="E00588" or barcode="E00589" or barcode="E00654"

Re: Mail App

2004-07-06 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Hello all, I have written first in PHP and then in Java an app to fetch attachments from a remote mailbox. I am not satisfied with Java's libraries as well as its memory requirements and speedy. Therefore I want to do the same in Perl so that it can run smoothly on my L

Re: Please explain what this code does

2004-07-06 Thread Gunnar Hjalmarsson
Andrey Demenev wrote: This is code from Mail::DeliveryStatus::BounceParser @error_lines = (grep { /\S/ } grep { ! /error detail/i } grep { /message.*not delivered to the following/i .. /error detail/i } split /\n/, $error_part); Could someone p

Mail App

2004-07-06 Thread linuxnand
Hello all, I have written first in PHP and then in Java an app to fetch attachments from a remote mailbox. I am not satisfied with Java's libraries as well as its memory requirements and speedy. Therefore I want to do the same in Perl so that it can run smoothly on my Linux box. Because of th

output

2004-07-06 Thread DBSMITH
All, my goal will look like this: -w 'barcode="E00085" or barcode="E00086" or barcode="E00096" or barcode="E00184" -w 'barcode="E00293" or barcode="E00351" or barcode="E00524" or barcode="E00584" -w 'barcode="E00587" or barcode="E00588" or barcode="E00589" or barcode="E00654" -w 'barcode="E0

All Email problems are now resolved (Thanks for your efforts!)

2004-07-06 Thread jason corbett
I was able to narrow down the problem and fix the code. I apologize if I took your time away from other trouble shooting tasks. I am still recovering from alchohol and Barb-B-Que!!! Good day!

I fixed the email problem, but guess what.......

2004-07-06 Thread jason corbett
Ok, I fixed the problem with emailing the file, but its now coming with some type of symbols [EMAIL PROTECTED] the file that i am trying to send has been properly created, but MIME::Lite isn't emailing it. Its emailing me a textfile with the same name as the file onthe server, but without the

Re: Attachment(s) not being emailed (shooting blanks!!)

2004-07-06 Thread jason corbett
I am not sure what is actually the error. i followed an example to send an HTML doc out based on perldoc MIME's example. "JupiterHost.Net" <[EMAIL PROTECTED]> wrote: jason corbett wrote: > I am using the script below to mail out attachments after running a job. When I run > the script, it send

RE: Help with array reference that has a HASH reference.

2004-07-06 Thread Charles K. Clarkson
Rod Za <[EMAIL PROTECTED]> wrote: : --- "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote: :: next unless :: /^ :: \Q$printer\E- :: (\d+)\s+ :: (\w+)\s+\d+\s+\w+\s :: (\d+\s\w+\s\d+\s\d{2}:\d{2}:\d{2}) ::

Re: Attachment(s) not being emailed (shooting blanks!!)

2004-07-06 Thread JupiterHost.Net
jason corbett wrote: I am using the script below to mail out attachments after running a job. When I run the script, it send out an email with an attachment that is untitled and blank. I want to add the attachment which is a text file (myfile.txt) located in /home/servername/myfile. Can you see wh

Attachment(s) not being emailed (shooting blanks!!)

2004-07-06 Thread jason corbett
I am using the script below to mail out attachments after running a job. When I run the script, it send out an email with an attachment that is untitled and blank. I want to add the attachment which is a text file (myfile.txt) located in /home/servername/myfile. Can you see what is wrong in my f

Re: GnuPG::Interface hangs while decrypting files over 61068 bytes

2004-07-06 Thread Joshua Colson
On Tue, 2004-07-06 at 14:41, Wiggins d Anconia wrote: > > 'direct' is slightly different, I am not sure there is a way to do this > in the options to G::I, but should instead be done directly to your > handles, I am also not sure of a way to specify non-buffered during > handle instantiation. You

Re: __DATA__ Token Problem

2004-07-06 Thread John W . Krahn
On Tuesday 06 July 2004 03:47, Bastian Angerstein wrote: > > my $data = tell DATA; > print "$data\n"; > truncate $0, $data; > > This looks very promising to me. > Therefor that the host is a Unixsystem, I might be able to solve my > problem. > > I don´t really understand $0 at the moment. > I thoug

Re: Split the line with "|" character

2004-07-06 Thread James Edward Gray II
On Jul 6, 2004, at 4:09 PM, Wil wrote: Dear Folks, I'm trying to split a line that contains a pipe "|" and I cann't find a way how to do it. If i put a back slash "\", it doesn't work either. Can somebody help me how to do it? There's really nothing wrong with your code, so the problem is somethi

RE: Split the line with "|" character

2004-07-06 Thread Chris Mortimore
-Original Message- From: Wil [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 4:09 PM To: [EMAIL PROTECTED] Subject: Split the line with "|" character Dear Folks, I'm trying to split a line that contains a pipe "|" and I cann't find a way how to do it. If i put a back slash "\",

Split the line with "|" character

2004-07-06 Thread Wil
Dear Folks, I'm trying to split a line that contains a pipe "|" and I cann't find a way how to do it. If i put a back slash "\", it doesn't work either. Can somebody help me how to do it? My code is : while ($line = ) { chomp $line; @data = split ("\|",$line); .. } Thanks Wi

Re: GnuPG::Interface hangs while decrypting files over 61068 bytes

2004-07-06 Thread Wiggins d Anconia
> > On Tue, 2004-07-06 at 11:47, Wiggins d Anconia wrote: > > > > > I suspected it might be a buffering problem, and the docs for > > GnuPG::Interface state in the FAQ: > > > > "When having GnuPG process a large message, sometimes it just hanges > there. > > > > Your problem may be due to

Problem installing Net::DNS

2004-07-06 Thread Kevin W. Gagel
I can't seem to get Net::DNS installed. After it runs its tests it reports: Failed 1/19 test scripts, 94.74% okay. 5/816 subtests failed, 99.39% okay. make: *** [test_dynamic] Error 2 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without forc

Re: GnuPG::Interface hangs while decrypting files over 61068 bytes

2004-07-06 Thread Joshua Colson
On Tue, 2004-07-06 at 11:47, Wiggins d Anconia wrote: > > I suspected it might be a buffering problem, and the docs for > GnuPG::Interface state in the FAQ: > > "When having GnuPG process a large message, sometimes it just hanges there. > > Your problem may be due to buffering issues; when

Re: Form Validation

2004-07-06 Thread JupiterHost.Net
John Pretti wrote: Hi all, Hello, What is the best way to validate a form element? I am using the following code to generate a set of radio buttons; how can I ensure that one of the buttons is checked before processing the rest of the script? Assuming %label is hw => 'H W here', nw => 'North West

RE: multiple inheritance

2004-07-06 Thread perl.org
On Tue, 6 Jul 2004 12:01:44 -0700, Bakken, Luke wrote > > Wouldn't you want this instead? > > package Bar; > > @ISA = qw/Foo/; > > sub new > { > my $s = shift; > my $class = ref($s) || $s; > my $self = $class->SUPER::new(); > bless $self, $class; > return $self; >

RE: multiple inheritance

2004-07-06 Thread Bakken, Luke
> > If so, in my > > constructor, how do I explicitly call the parent constructor? > >package Bar; > >@ISA = qw/Foo/; > >sub new { >my $class = shift; >bless Foo->new(@_), $class; >} Wouldn't you want this instead? package Bar; @ISA = qw/Foo/; sub new {

RE: multiple inheritance

2004-07-06 Thread Bob Showalter
perl.org wrote: > I have a vendor-provided OO package and a custom OO package. The > custom package does not need a constructor. I want to have a class > that inherits from both. It also does not need a constructor - it > should use the constructor from the vendor-provided package. > > I have a

Re: GnuPG::Interface hangs while decrypting files over 61068 bytes

2004-07-06 Thread Wiggins d Anconia
> > Hey folks, > > I'm trying to get GnuPG::Interface working and I've run into a > problem. It seems that when trying to decrypt a file where the plaintext > version is over 61068 bytes that GnuPG::Interface just hangs. I've done > extensive testing and it appears to work just fine when the pl

Form Validation

2004-07-06 Thread John Pretti
Hi all, What is the best way to validate a form element? I am using the following code to generate a set of radio buttons; how can I ensure that one of the buttons is checked before processing the rest of the script? print $q->start_multipart_form, $q->p("Please select a direc

Re: warnings on old Perl

2004-07-06 Thread Gunnar Hjalmarsson
Perl.Org wrote: I have to work with this version of Perl: This is perl, version 5.005_03 built for MSWin32-x86 When I 'use warnings' it says: Can't locate warnings.pm in @INC Right, the warnings pragma was introduced with version 5.6.0. How do I enable warnings in this case? I think there is a -w

Re: Hash of an array with colon and comma separator

2004-07-06 Thread JupiterHost.Net
Edward Wijaya wrote: Hi, Hello, I have a file that contain this: GCTTGACGG: GCTTGACGA,GCTTGACCG,GCTTGACGA CTTGAAGAG: CTTGACGAG,CTTGACGAG,CTTGACGAG,CTTGACGAG,CTTGAAGAA CTTGACGAA: CTTGACGAG,CTTGACGAG,CTTGACGAG,CTTGACGAG My problem is that I want to create hash of and array. Where the 'word' to the l

GnuPG::Interface hangs while decrypting files over 61068 bytes

2004-07-06 Thread Joshua Colson
Hey folks, I'm trying to get GnuPG::Interface working and I've run into a problem. It seems that when trying to decrypt a file where the plaintext version is over 61068 bytes that GnuPG::Interface just hangs. I've done extensive testing and it appears to work just fine when the plaintext file is

RE: Hash of an array with colon and comma separator

2004-07-06 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Edward Wijaya wrote: > Hi, > > I have a file that contain this: > > GCTTGACGG: GCTTGACGA,GCTTGACCG,GCTTGACGA > CTTGAAGAG: CTTGACGAG,CTTGACGAG,CTTGACGAG,CTTGACGAG,CTTGAAGAA > CTTGACGAA: CTTGACGAG,CTTGACGAG,CTTGACGAG,CTTGACGAG > > My problem is that I want to create hash of and array. > Where the

Hash of an array with colon and comma separator

2004-07-06 Thread Edward Wijaya
Hi, I have a file that contain this: GCTTGACGG: GCTTGACGA,GCTTGACCG,GCTTGACGA CTTGAAGAG: CTTGACGAG,CTTGACGAG,CTTGACGAG,CTTGACGAG,CTTGAAGAA CTTGACGAA: CTTGACGAG,CTTGACGAG,CTTGACGAG,CTTGACGAG My problem is that I want to create hash of and array. Where the 'word' to the left of the colon is the hash

RE: Help with array reference that has a HASH reference.

2004-07-06 Thread Rod Za
Hi Charles, thank you very much for the help and the hint: --- "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote: [snip] > We really don't need %job at all: > my @jobs; > foreach ( @lpstat ) { > next unless > /^ > \Q$printer\E- > (\d+)

multiple inheritance

2004-07-06 Thread perl.org
I have a vendor-provided OO package and a custom OO package. The custom package does not need a constructor. I want to have a class that inherits from both. It also does not need a constructor - it should use the constructor from the vendor-provided package. I have a problem when my inheritin

RE: make perl scripts in to .exe and a services

2004-07-06 Thread Bob Showalter
Thomas Browner wrote: > Is there away to make a perl scripts in to a .exe and a services for > free. -- For making Windows services, see Win32::Daemon and Win32::Daemon::Simple on CPAN. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

warnings on old Perl

2004-07-06 Thread perl.org
I have to work with this version of Perl: This is perl, version 5.005_03 built for MSWin32-x86 When I 'use warnings' it says: Can't locate warnings.pm in @INC How do I enable warnings in this case? I think there is a -w on the shebang line, but I am trying to enable warnings from my modules an

Please explain what this code does

2004-07-06 Thread Andrey Demenev
This is code from Mail::DeliveryStatus::BounceParser @error_lines = (grep { /\S/ } grep { ! /error detail/i } grep { /message.*not delivered to the following/i .. /error detail/i } split /\n/, $error_part); Could someone please explain what t

RE: make perl scripts in to .exe and a services

2004-07-06 Thread NYIMI Jose (BMB)
> -Original Message- > From: Prasanna Kothari [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 06, 2004 3:29 PM > To: Thomas Browner > Cc: [EMAIL PROTECTED] > Subject: Re: make perl scripts in to .exe and a services > > > Look at this: > http://www.indigostar.com/perl2exe.htm PAR has s

Please explain what this code does

2004-07-06 Thread Andrey Demenev
This is code from Mail::DeliveryStatus::BounceParser @error_lines = (grep { /\S/ } grep { ! /error detail/i } grep { /message.*not delivered to the following/i .. /error detail/i } split /\n/, $error_part); Could someone please explain what thi

Re: make perl scripts in to .exe and a services

2004-07-06 Thread Prasanna Kothari
Look at this: http://www.indigostar.com/perl2exe.htm Thomas Browner wrote: Is there away to make a perl scripts in to a .exe and a services for free. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Help with array reference that has a HASH reference.

2004-07-06 Thread Charles K. Clarkson
Rod Za <[EMAIL PROTECTED]> wrote: : I'm trying to do a function that load all the jobs from : the printers on systems (Unix), and this function : returns a hash that has the printer name, the number of : jobs and an array that got another hash with the names : of job, owner jobs, date of the job.

Re: make perl scripts in to .exe and a services

2004-07-06 Thread Gunnar Hjalmarsson
Thomas Browner wrote: Is there away to make a perl scripts in to a .exe and a services for free. http://search.cpan.org/perldoc?pp -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

make perl scripts in to .exe and a services

2004-07-06 Thread Thomas Browner
Is there away to make a perl scripts in to a .exe and a services for free. -- *Thomas * -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Timeout problem

2004-07-06 Thread Philipp Traeder
On Tuesday 06 July 2004 10:58, Werner Otto wrote: > Hi All, > > I have the following script: Hi Otto, IIRC, you've posted nearly exactly the same question last thursday... > > #!/usr/bin/perl > use IO::Socket; > > my $host=shift @ARGV or die 'need hostname'; > my $port=shift @ARGV or die 'need p

Re: Automating Fasta Sequence submission

2004-07-06 Thread Gunnar Hjalmarsson
Stuart Gillies wrote: im pretty stuck, firstly on how to tell perl how to recognise each fasta sequnce, Do you know anything about reading a file? perldoc perlintro and then all the online submission stuff Spend some time with a tutorial for CGI with Perl. http://cgi.resourceindex.com/Docum

Automating Fasta Sequence submission

2004-07-06 Thread Stuart Gillies
Hi, im pretty new to perl, and could really do with some help; i have a text file with over 50 Fasta sequences (genetic sequences that start with the > symbol for example here are 2 fasta sequences - this is how it appears in my text file: mm4_blastzTightHg16_none_knownGene_chr21 range=chr17:311

RE: __DATA__ Token Problem

2004-07-06 Thread Bastian Angerstein
Thanks for your Tips. my $data = tell DATA; print "$data\n"; truncate $0, $data; This looks very promising to me. Therefor that the host is a Unixsystem, I might be able to solve my problem. I don´t really understand $0 at the moment. I thought its the name the script was started with. Bastia

Timeout problem

2004-07-06 Thread Werner Otto
Hi All, I have the following script: #!/usr/bin/perl use IO::Socket; my $host=shift @ARGV or die 'need hostname'; my $port=shift @ARGV or die 'need port number'; my [EMAIL PROTECTED] or die 'need timeout';; my $socket=IO::Socket::INET->new(PeerAddr=> $host, PeerPort => $port, Proto =>

RE: Backticks alternative?

2004-07-06 Thread Tim Johnson
My bad. I changed it to try to make it sound more descriptive, but didn't test. Thanks for pointing it out. -Original Message- From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] Sent: Tue 7/6/2004 1:00 AM To: [EMAIL PROTECTED] Cc: S

Re: Backticks alternative?

2004-07-06 Thread Gunnar Hjalmarsson
Gunnar Hjalmarsson wrote: Hmm.. Is there any situation when it's motivated to do that instead of using backticks (or the qr// operator)? Sorry.. I meant the qx// operator. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: Backticks alternative?

2004-07-06 Thread Gunnar Hjalmarsson
Prasanna Kothari wrote: Gohaku wrote: After using backticks to retrieve executable output, I would like to know if there is a backtick alternative. Try this local *CMD; $cmd = "dir"; open(CMD,"$cmd 2>&1|")|| die "Could not open file handle\n"; while() { print $_,"\n"; } close(CMD) || die "Could

Re: Backticks alternative?

2004-07-06 Thread Gunnar Hjalmarsson
Tim Johnson wrote: Gohaku wrote: After using backticks to retrieve executable output, I would like to know if there is a backtick alternative. If you want the exact same function as the backticks, why not just make a small subroutine? Maybe because it's unnecessary, since there already is an operat

Re: Backticks alternative?

2004-07-06 Thread Gunnar Hjalmarsson
Suresh Pasupula wrote: Gohaku wrote: After using backticks to retrieve executable output, I would like to know if there is a backtick alternative. You can use in the following way: $exec = "ls -l"; $src = system($exec); Please read "perldoc -f system" to find out why you typically can *not* use s

Re: Backticks alternative?

2004-07-06 Thread Brian Eable
On Tue, 6 Jul 2004 00:28:57 -0400, gohaku <[EMAIL PROTECTED]> wrote: > Hi everyone, > After using backticks to retrieve executable output, > I would like to know if there is a backtick alternative. > > For example, to get a File Listing on a Unix-based system, > I will do the usual: > > $exec = "

Re: Backticks alternative?

2004-07-06 Thread John W . Krahn
On Monday 05 July 2004 21:28, gohaku wrote: > > Hi everyone, Hello, > After using backticks to retrieve executable output, > I would like to know if there is a backtick alternative. > > For example, to get a File Listing on a Unix-based system, > I will do the usual: > > $exec = "ls -l"; > $src =