Re: Search and Replace

2007-07-13 Thread Chas Owens
On 7/13/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: snip open (FILEIN, "< $ARGV[0]") or die $!; my @lines = ; snip In list context the <> operatot returns all lines, but in scalar context it returns on line at a time. This can be used with a while loop to walk over the file in pieces (a ne

RE: Search and Replace

2007-07-13 Thread Joseph L. Casale
OK, I saw your example and noted it. I intended on using next time as I know there will be:) But now I am convinced, as the lack of error checking in my script worries me. I'll take yours and fit it in! I do need to read up on what you're doing as I am not clear on its syntax in this email. I a

Re: PDF to Text

2007-07-13 Thread Jeff Pang
--- Mike Lesser <[EMAIL PROTECTED]> wrote: > Hi all. Like it says, I need to extract the content > of a PDF file. > > I installed the tool pdftotext, and it works fine > for my needs. I > recall there was a very simple module that used this > to extract text, > but for the life of me, I can'

Re: Search and Replace

2007-07-13 Thread Rob Dixon
Joseph L. Casale wrote: One of these scripts has a loop like this: for my $line (@lines){ my $line2 = $line; $line =~ s/(\S+)\s+(\S+)\s+(\S+)/X$1 Y$2/; print FILEOUT $line; $line2 =~ s/(\S+)\s+(\S+)\s+(\S+)/Z[$3+DPad]/; print FILEOUT $line2; print FILEOUT "M98PDRILL.SUBL1\n"; print FILEOU

Re: Search and Replace

2007-07-13 Thread Rob Dixon
Joseph L. Casale wrote: One of these scripts has a loop like this: for my $line (@lines){ my $line2 = $line; $line =~ s/(\S+)\s+(\S+)\s+(\S+)/X$1 Y$2/; print FILEOUT $line; $line2 =~ s/(\S+)\s+(\S+)\s+(\S+)/Z[$3+DPad]/; print FILEOUT $line2; print FILEOUT "M98PDRILL.SUBL1\n"; print FILEOU

Re: Search and Replace

2007-07-13 Thread Tom Phoenix
On 7/13/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: What would be a wise way of trapping a condition such as the line read and passed into the loop is not 3 sets of numbers and if so, skip? Use the 'next' operator. It's documented in perlfunc. Hope this helps! --Tom Phoenix Stonehenge P

RE: Search and Replace

2007-07-13 Thread Joseph L. Casale
One of these scripts has a loop like this: for my $line (@lines){ my $line2 = $line; $line =~ s/(\S+)\s+(\S+)\s+(\S+)/X$1 Y$2/; print FILEOUT $line; $line2 =~ s/(\S+)\s+(\S+)\s+(\S+)/Z[$3+DPad]/; print FILEOUT $line2; print FILEOUT "M98PDRILL.SUBL1\n"; print FILEOUT "G90\n"; print FILEOUT

Re: Installing perl modules problem

2007-07-13 Thread Vivek Menon
I did the installation without using CPAN and it's worked somehow. there's lot of env variables I set up: # setenv PATH \ /usr/sfw/bin:/usr/local/bin:/usr/bin:/bin # setenv PATH \ ${PATH}:/usr/ccs/bin:/usr/sbin:/opt/sfw/bin:. # setenv LD_LIBRARY_PATH \ /usr/sfw/lib:/usr/local/lib:/opt/s

PDF to Text

2007-07-13 Thread Mike Lesser
Hi all. Like it says, I need to extract the content of a PDF file. I installed the tool pdftotext, and it works fine for my needs. I recall there was a very simple module that used this to extract text, but for the life of me, I can't find it on CPAN! Any leads? Using a command-line script

Re: Global symbol "$var1" requires explicit

2007-07-13 Thread [EMAIL PROTECTED]
On Jul 8, 6:14 pm, [EMAIL PROTECTED] (Ken Foskey) wrote: > # Since you are use strict you must declare all variables before using > # them. The "before" in that statement may be missleading. >95% of the time the best place to declare variable is _when_ you first use them. > my ($var1, $var2);

Re: lost in crazy arrays and hashes

2007-07-13 Thread [EMAIL PROTECTED]
On Jul 13, 12:03 pm, [EMAIL PROTECTED] (Inventor) wrote: > Thanks for helping with my question the other day, now I have > another. In my class I have an array of hashes In Perl, when we say "array of hashes" we are using it as shorthand for "array of references to hashes". 99% of the time ever

Re: Installing perl modules problem

2007-07-13 Thread [EMAIL PROTECTED]
On Jul 13, 4:27 pm, [EMAIL PROTECTED] (Vivek Menon) wrote: > Hello All, > I am a beginner and I am trying to install a bioinformatics > utility(Interproscan) on a Sun Solaris machine. This software is based > on Perl packages and I am having problems installing some specific > perl modules. Can som

Re: put an array into the 0th element of $self

2007-07-13 Thread Mr. Shawn H. Corey
Dr.Ruud wrote: "Chas Owens" schreef: [put an array @teams into the 0th element of $self] The proper syntax is $self->[0]{teams} = [ @teams ]; That makes a copy. If you don't want that, for example because it could contain millions of items, you can use $self->[0]{teams} = [EMAIL PRO

Re: Installing perl modules problem

2007-07-13 Thread Jefferson Kirkland
On 7/13/07, Vivek Menon <[EMAIL PROTECTED]> wrote: I am using the CPAN method and I have done the following: Install from source expat-1.95.5 export PATH=$PATH:/opt/SUNWspro/bin: /usr/sfw/bin:/usr/ccs/bin export CC=cc export CPPFLAGS="-l/usr/local/include -I/usr/sfw/include -I/opt/sfw/incl

Re: Solved: Re: Time stamp not updating

2007-07-13 Thread Dr.Ruud
CM Analyst schreef: > my ($sec, $min, $hour, > $mday, $mon, $year, > $wday, $yday, $isdst) = localtime(); You don't have to allocate variables for the values that you don't need, so in your case this might be sufficient: my ($sec, $min, $hour) = localtime; If you need

put an array into the 0th element of $self (was: Re: lost in crazy arrays and hashes)

2007-07-13 Thread Dr.Ruud
"Chas Owens" schreef: > [put an array @teams into the 0th element of $self] > The proper syntax is > $self->[0]{teams} = [ @teams ]; That makes a copy. If you don't want that, for example because it could contain millions of items, you can use $self->[0]{teams} = [EMAIL PROTECTED]; --

Re: Installing perl modules problem

2007-07-13 Thread Jefferson Kirkland
On 7/13/07, Vivek Menon <[EMAIL PROTECTED]> wrote: Hello All, I am a beginner and I am trying to install a bioinformatics utility(Interproscan) on a Sun Solaris machine. This software is based on Perl packages and I am having problems installing some specific perl modules. Can someone help?? I n

Solved: Re: Time stamp not updating

2007-07-13 Thread CM Analyst
Dear All, The following works for me. # use strict; use warnings; use Win32::SerialPort; use IO::Select; use IO::File; use IO::Handle; use Time::Local; # Serial Settings open (PORT, "+>COM1") || die "Can't Open Port\n"; open (LOG, "> c:\\temp\\logdata.txt") || die "Can't Open File

Re: Time stamp not updating

2007-07-13 Thread Mr. Shawn H. Corey
CM Analyst wrote: Hi, In the following script, I am inserting a time stamp. The problem is that the time stamp ($sec) is not incrementing. What am I doing wrong? open (PORT, "+>COM1") || die "Can't Open Port\n"; open (LOG, "> c:\\temp\\logdata.txt") || die "Can't Open File\n"; while ( ) { #p

Re: Time stamp not updating

2007-07-13 Thread Chas Owens
On 7/13/07, CM Analyst <[EMAIL PROTECTED]> wrote: snip What am I doing wrong? snip As far as I can see from the code you posted $hour, $min, and $sec shouldn't even have values. Scalars don't magically change value (unless they are tied, but that is magic), so you must put something inside the

Re: lost in crazy arrays and hashes

2007-07-13 Thread Mr. Shawn H. Corey
Inventor wrote: Hi, Thanks for helping with my question the other day, now I have another. In my class I have an array of hashes and it seems to work just fine. I use the zeroth element to store individual variables and all the other elements to store variables that change over time. For exam

Re: lost in crazy arrays and hashes

2007-07-13 Thread Chas Owens
On 7/13/07, Inventor <[EMAIL PROTECTED]> wrote: snip $self->[0]{'teams'} = @teams; and @self->[0]{'teams'} = @teams; but when I try to access the array with foreach $team ($self->[0]{'teams'}) { print $team.' '; } or foreach $team (@self->[0]('teams')) { print $team.' ': } i get no

lost in crazy arrays and hashes

2007-07-13 Thread Inventor
Hi, Thanks for helping with my question the other day, now I have another. In my class I have an array of hashes and it seems to work just fine. I use the zeroth element to store individual variables and all the other elements to store variables that change over time. For example, i have the va

Time stamp not updating

2007-07-13 Thread CM Analyst
Hi, In the following script, I am inserting a time stamp. The problem is that the time stamp ($sec) is not incrementing. What am I doing wrong? open (PORT, "+>COM1") || die "Can't Open Port\n"; open (LOG, "> c:\\temp\\logdata.txt") || die "Can't Open File\n"; while ( ) { #print $_; #sleep 1; #

Installing perl modules problem

2007-07-13 Thread Vivek Menon
Hello All, I am a beginner and I am trying to install a bioinformatics utility(Interproscan) on a Sun Solaris machine. This software is based on Perl packages and I am having problems installing some specific perl modules. Can someone help?? I need to install the following perl modules: Module XML:

Re: Email Notifications

2007-07-13 Thread usenet
On Jul 12, 4:09 pm, [EMAIL PROTECTED] (Mike Blezien) wrote: > I was just wondering if there was another way to track a mailing to see if it > was read, automatically > or other means of tracking email that has been received/read without the > recipient intervention? Nope, can't be done. (well, it

Re: Dynamically loading perl code

2007-07-13 Thread Andrew Greenwood
Jenda Krynicky wrote: Date sent: Fri, 13 Jul 2007 08:53:56 +0200 From: "Gregory Machin" <[EMAIL PROTECTED]> What I want to do is to write a service monitoring daemon, where the core or body of the script parses a directory, that contains the config / perl scripts, and is loaded i

Re: Dynamically loading perl code

2007-07-13 Thread Jenda Krynicky
Date sent: Fri, 13 Jul 2007 08:53:56 +0200 From: "Gregory Machin" <[EMAIL PROTECTED]> > What I want to do is to write a service monitoring daemon, where the > core or body of the script parses a directory, that contains the > config / perl scripts, and is loaded into the core script, i

Re: [OT] Email Notifications

2007-07-13 Thread Mike Blezien
- Original Message - From: "yitzle" <[EMAIL PROTECTED]> To: "Mike Blezien" <[EMAIL PROTECTED]> Cc: Sent: Friday, July 13, 2007 8:41 AM Subject: Re: [OT] Email Notifications If you're using email, it can't be done. What you /could/ do is set up a message system on a website and send

Re: [OT] Email Notifications

2007-07-13 Thread yitzle
If you're using email, it can't be done. What you /could/ do is set up a message system on a website and send messages there. You can email them when a message gets sent and tell them to log in to read the message. In that scenario, you could monitor who read the message and who didn't. -- To uns

Re: [OT] Email Notifications

2007-07-13 Thread Mike Blezien
- Original Message - From: "Rob Dixon" <[EMAIL PROTECTED]> To: Sent: Friday, July 13, 2007 7:47 AM Subject: Re: [OT] Email Notifications Mike Blezien wrote: we have been using the "Disposition-Notification-To: in the mail header("Request Read Receipt") to be notified when an ema

Re: Dynamically loading perl code

2007-07-13 Thread Ken Foskey
On Fri, 2007-07-13 at 08:37 -0400, Mr. Shawn H. Corey wrote: > If you want to run scripts, you should use system(). See `perldoc -f > system` or: open( PROG, '|-', 'myscript.sh options' ) or die ... while( ) { } close PROG if( $? ) { die "I have failed"; } -- Ken Foskey FOSS developer

Re: [OT] Email Notifications

2007-07-13 Thread Rob Dixon
Mike Blezien wrote: we have been using the "Disposition-Notification-To: in the mail header("Request Read Receipt") to be notified when an email has been received, but this does require the recipient to respond Yes or No to send response. I was just wondering if there was another way to tr

Re: Dynamically loading perl code

2007-07-13 Thread Mr. Shawn H. Corey
Gregory Machin wrote: What I want to do is to write a service monitoring daemon, where the core or body of the script parses a directory, that contains the config / perl scripts, and is loaded into the core script, if one of the scripts has an unrecoverable error, it's dumped, thus preserving the