Re: Pattern matching problem

2004-02-25 Thread R. Joseph Newton
Kenton Brede wrote: > On Wed, Feb 25, 2004 at 05:52:19PM -, Rob Dixon ([EMAIL PROTECTED]) wrote: > > Kenton Brede wrote: > > > > > > > I'm having trouble counting the number of specific substrings within a > > > > string. I'm working on a bioinformatics coursework at the moment, so my > > > >

Re: Splitting html into body and header...

2004-02-25 Thread juman
Okay.. cpan.org here I come :) /juman On Wed, Feb 25, 2004 at 05:47:18PM -0500, Casey West wrote: > HTML::TreeBuilder is a good module to look at. > > Casey West -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Reg. 'repeated pattern' matching

2004-02-25 Thread Randy W. Sims
On 2/25/2004 9:29 PM, Balaji Thoguluva wrote: Hi, I have a question on pattern matching. Assume I have a line like this consisting of header field(via) and values(IPaddress) repeated like below via: 192.168.6.100; via:192.168.6.101; via: 203.290.89.90; ..so on I would like to know ho

RE: get external process's output *and* return value

2004-02-25 Thread David le Blanc
> -Original Message- > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Thursday, 26 February 2004 1:00 PM > To: [EMAIL PROTECTED] > Subject: Re: get external process's output *and* return value > > David Le Blanc wrote: > > > > > From: John W. Krahn [mailto:[EMAIL PROTECTED] > > >

Re: File name comparisons?

2004-02-25 Thread WC -Sx- Jones
Wiggins d'Anconia wrote: ... So for now we end up with something along these lines: -- UNTESTED -- Well, then get Perl to write one itself: find2perl . -mtime +'30' -print -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Count the number of lines in a file without actually iteratin g through the file

2004-02-25 Thread WC -Sx- Jones
[ what was all that? in-line top posting? please don't ] Hanson, Rob wrote: Is there a way to determine the number of lines in a file without actually iterating through the file and incrementing a file? # No silver bullet; but shorter - undef $/; # Slurp; foreach $target (@ARGV) { @lines =

Re: Reg. 'repeated pattern' matching

2004-02-25 Thread Jeff 'japhy' Pinyan
On Feb 26, Balaji Thoguluva said: >I have a question on pattern matching. Assume I have a line like this >consisting of header field(via) and values(IPaddress) repeated like below > >via: 192.168.6.100; via:192.168.6.101; via: 203.290.89.90; ..so on > >I would like to know how many via: header

RE: Reg. 'repeated pattern' matching

2004-02-25 Thread Charles K. Clarkson
Balaji Thoguluva [mailto:[EMAIL PROTECTED] wrote: : : I have a question on pattern matching. Assume I have a : line like this consisting of header field(via) and : values(IPaddress) repeated like below : : via: 192.168.6.100; via:192.168.6.101; via: 203.290.89.90; ..so on : : I woul

Re: get external process's output *and* return value

2004-02-25 Thread Andrew Gaffney
[EMAIL PROTECTED] wrote: Use my $status = $?>>8 From your code, I could not tell how yoy were running MAKE (you were only processing items in the make file). So Assuming you were running "make -f my_makefile". Then this should do it. #!/opt/local/bin/perl $foo=`make -f my_makefile`; #you could

Reg. 'repeated pattern' matching

2004-02-25 Thread Balaji Thoguluva
Hi, I have a question on pattern matching. Assume I have a line like this consisting of header field(via) and values(IPaddress) repeated like below via: 192.168.6.100; via:192.168.6.101; via: 203.290.89.90; ..so on I would like to know how many via: header field occur and to get each

Re: listing prime numbers in a range (Beginning Perl exercise)

2004-02-25 Thread R. Joseph Newton
Stuart White wrote: > > Yes, that's what I was doing at first. Then I > consulted "Beginning Perl," and it told me that I had > to "stringify" the list to get spaces in between the > numbers. Hi Stuart, Well, it does seem to work that way, but you should do the stringifying only as you print.

Re: get external process's output *and* return value

2004-02-25 Thread John W. Krahn
David Le Blanc wrote: > > > From: John W. Krahn [mailto:[EMAIL PROTECTED] > > > > Andrew Gaffney wrote: > > > > > > Is there a way to get an external process's output *and* > > return value? I have a program > > > that opens a pipe to 'make', process all the input, and > > then checks the return v

Re: Count the number of lines in a file without actually iterating through the file

2004-02-25 Thread John W. Krahn
Jason Normandin wrote: > > Hi List. Hello, > Is there a way to determine the number of lines in a file without actually > iterating through the file and incrementing a file? > > I found the following on perlmonks.org, it works great but this is command > line syntax > > perl -lpe '}{*_=*.}{' f

Re: Net::FTP errors

2004-02-25 Thread Wiggins d'Anconia
Jas wrote: Ok, I am getting frustrated with this... Any help is appreciated. Step back, breathe, eat a sandwich, go for a walk... now try again... [FTP Script] #!/usr/bin/perl use strict; # always use warnings; # usually The longer you avoid the above after having been told the shorter your he

RE: PERL on 9.2 and XP Prof.

2004-02-25 Thread David le Blanc
Can anyone comment on ActiveState perl vs Cygwin perl? I've used both and they seem about the same.. except for the confusing paths that cygwin uses. > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED] > Sent: Thursday, 26 February 2004 3:03 AM > To: 'KENNETH JANUSZ'; 'PE

Re: File name comparisons?

2004-02-25 Thread Wiggins d'Anconia
d. Jas Back to your objective, assuming it is correct... 1. List files on remote machine correct 2. Step through list of files sorting into a list that we can then retrieve all but the 30 newest also correct 3. Step through list of files needing deletion, deleting them from the remote source.

RE: Perl Newbie

2004-02-25 Thread David le Blanc
LOL ;-) I already apologised for the crack about RPC ... [move along, nothing to see here] > -Original Message- > From: WC -Sx- Jones > [mailto:[EMAIL PROTECTED] > Sent: Thursday, 26 February 2004 4:48 AM > Cc: [EMAIL PROTECTED] > Subject: Re: Perl Newbie > > David le Blanc wrote:

RE: Count the number of lines in a file without actually iteratin g through the file

2004-02-25 Thread Hanson, Rob
> Is there a way to determine the number of lines > in a file without actually iterating through the > file and incrementing a file? No. > I found the following on perlmonks.org, it works > great but this is command line syntax When you deparse that command (see below), you can see that all it d

RE: get external process's output *and* return value

2004-02-25 Thread David le Blanc
> -Original Message- > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Thursday, 26 February 2004 6:56 AM > To: [EMAIL PROTECTED] > Subject: Re: get external process's output *and* return value > > Andrew Gaffney wrote: > > > > Is there a way to get an external process's output *an

Re: Pattern matching problem

2004-02-25 Thread wolf blaum
On Wednesday 25 February 2004 17:35, Henry Todd generously enriched virtual reality by making up this one: Hi, > I'm having trouble counting the number of specific substrings within a > string. I'm working on a bioinformatics coursework at the moment, so my > string looks like this: > > $sequen

RE: Count the number of lines in a file without actually iterating through the file

2004-02-25 Thread David le Blanc
> -Original Message- > From: Jason Normandin [mailto:[EMAIL PROTECTED] > Sent: Thursday, 26 February 2004 10:56 AM > To: Perl Beginners > Subject: Count the number of lines in a file without actually > iterating through the file > > Hi List. > > > > Is there a way to determine the nu

RE: Pattern matching problem

2004-02-25 Thread David le Blanc
> From: Bakken, Luke [mailto:[EMAIL PROTECTED] > Sent: Thursday, 26 February 2004 4:59 AM > To: Henry Todd; [EMAIL PROTECTED] > Subject: RE: Pattern matching problem > > > I'm having trouble counting the number of specific substrings > > within a > > string. I'm working on a bioinformatics cour

Count the number of lines in a file without actually iterating through the file

2004-02-25 Thread Jason Normandin
Hi List. Is there a way to determine the number of lines in a file without actually iterating through the file and incrementing a file? I found the following on perlmonks.org, it works great but this is command line syntax : perl -lpe '}{*_=*.}{' file How could I integrate this into a

Re: Pattern matching problem

2004-02-25 Thread Rob Dixon
Kenton Brede wrote: > > Well it seems there is confusion on my part as to which part of the FAQ > to follow. I'm sure there are tons of homework questions done for people > who disguise them. That is one reason I've always felt the "no homework > rule" is superfluous. Personally I have no proble

Re: Pattern matching problem

2004-02-25 Thread Rob Dixon
Kenton Brede wrote: > > OK my mistake. I've been on newsgroups/lists where the "no homework rule" > is enforced and just assumed the FAQ was literal, except for the > "monkey" parts of course. > > I just didn't want the OP to be hanging waiting for an answer when non > would be forthcoming. Hmm.

Re: Filesystems mounting

2004-02-25 Thread Kenton Brede
On Wed, Feb 25, 2004 at 02:39:43PM -0800, Uma Lakshmanan ([EMAIL PROTECTED]) wrote: > Hi , > I am trying to write a script to see if a particular file system is > mounted. If not I need to mount the file system. Is there a specific > function that I could use for the file system. > Thanks in advan

RE: Is there an etc. command in perl?

2004-02-25 Thread David le Blanc
> -Original Message- > From: Joel [mailto:[EMAIL PROTECTED] > Sent: Thursday, 26 February 2004 7:53 AM > To: perl > Subject: Is there an etc. command in perl? > > Is there an et cetera type command in perl? Specifically, That's part of the Perl 7 - DWIM spec. You may have to wait until

Re: Splitting html into body and header...

2004-02-25 Thread Casey West
It was Wednesday, February 25, 2004 when David O'Dell took the soap box, saying: : juman wrote: : >Does anyoen have a good tip if there is a module or good way to split a : >html file inte header and body? What I want to do is to combine several : >htmlfiles into one. And the idea is to remove all

Filesystems mounting

2004-02-25 Thread Uma Lakshmanan
Hi , I am trying to write a script to see if a particular file system is  mounted. If not I need to mount the file system. Is there a specific function that I could use for  the file system. Thanks in advance. Uma Lakshmanan <>

Re: Splitting html into body and header...

2004-02-25 Thread David O'Dell
juman wrote: Does anyoen have a good tip if there is a module or good way to split a html file inte header and body? What I want to do is to combine several htmlfiles into one. And the idea is to remove all headers from all the files and combine the bodys into a big new one with a new header... /ju

Splitting html into body and header...

2004-02-25 Thread juman
Does anyoen have a good tip if there is a module or good way to split a html file inte header and body? What I want to do is to combine several htmlfiles into one. And the idea is to remove all headers from all the files and combine the bodys into a big new one with a new header... /juman -- To

Net::FTP errors

2004-02-25 Thread Jas
Ok, I am getting frustrated with this... Any help is appreciated. [FTP Script] #!/usr/bin/perl # Create datestamp variable use POSIX qw(strftime); $date = strftime('%Y%m%d', localtime()); # Create archive using TAR & GZIP system('tar -cf ../backups/www.tar ../www/'); system('gzip -fv9 ../backups

Re: Is there an etc. command in perl?

2004-02-25 Thread wolf blaum
On Wednesday 25 February 2004 21:52, Joel generously enriched virtual reality by making up this one: Hi, > Is there an et cetera type command in perl? Specifically, what I want to do > is to go from is there an etc command in any other programing language? > > while (1) { > my $num = shi

Re: Pattern matching problem

2004-02-25 Thread Henry Todd
Hi all - Many thanks to those who shared their knowledge. I had a feeling that there would be an elegant solution to my problem, but I was having no luck figuring it out. For reference, where before my code was: $Pcc++ while $sequence =~ /cc/gi; ..it is now: $Pcc++ while $sequence =~ /c(?=c)

RE: Is there an etc. command in perl?

2004-02-25 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Joel wrote: > Is there an et cetera type command in perl? Specifically, what I want > to do is to go from > > while (1) { > my $num = shift @numarray; > if ($num % 2==0) { > > and if the modulus of 2 is 0, find the modulus of 3 and so on. Can > anyone give me some suggestions? Unc

Re: Testing for STDIN

2004-02-25 Thread John W. Krahn
Timothy Donahue wrote: > > I have a program that I am writing that I need to accept input from > either STDIN (for file redirections or pipes) or from the command-line. > The program manipulates email addresses for our mail servers, so I > should have the option to do either 'email_add > [EMAIL PR

Re: 1 liner question

2004-02-25 Thread John W. Krahn
Chad Kellerman wrote: > > Hello everyone... Hello, > I am working on a perl one liner for adding quota on multiple > partitions. But I can not, for the life of me get the number to add > up.. > > Here is what I have: > > /usr/bin/quota michele | perl -ne 'if(/none$/){print > "

Is there an etc. command in perl?

2004-02-25 Thread Joel
Is there an et cetera type command in perl? Specifically, what I want to do is to go from while (1) { my $num = shift @numarray; if ($num % 2==0) { and if the modulus of 2 is 0, find the modulus of 3 and so on. Can anyone give me some suggestions? Thanks, Joel -- To unsubscribe, e-mai

Re: 1 liner question

2004-02-25 Thread WC -Sx- Jones
chad kellerman wrote: Sx, /usr/bin/quota michele | perl -ne 'if(/none$/){print "9\n"}elsif(m:^\s+/dev/:){($q, $l)=(split(/\s+/))[2,3];$t=($l-$q)*1024};next if(!$t);{print $t."\n"}' Is none a reserved word now? I ask because quota doesnt return the same values across Unix opsys... Otherwi

Re: Testing for STDIN

2004-02-25 Thread Steve Grazzini
Timothy Donahue wrote: I have a program that I am writing that I need to accept input from either STDIN (for file redirections or pipes) or from the command-line. The program manipulates email addresses for our mail servers, so I should have the option to do either 'email_add [EMAIL PROTECTED]' or

RE: Testing for STDIN

2004-02-25 Thread Bob Showalter
Timothy Donahue wrote: > I have a program that I am writing that I need to accept input from > either STDIN (for file redirections or pipes) or from the > command-line. The program manipulates email addresses for our mail > servers, so I should have the option to do either 'email_add > [EMAIL PROTE

Testing for STDIN

2004-02-25 Thread Timothy Donahue
I have a program that I am writing that I need to accept input from either STDIN (for file redirections or pipes) or from the command-line. The program manipulates email addresses for our mail servers, so I should have the option to do either 'email_add [EMAIL PROTECTED]' or 'email_add < /path/to/f

Re: 1 liner question

2004-02-25 Thread chad kellerman
Sx, This script goes into a procmail recipe I was working on. It's running on linux. If you run quota for a user and the quota is not set it returns actually returns none and I just print the 9's to signify that. If the user has quota on multiple partitions, the quota command prints the qu

Re: finding Process run time

2004-02-25 Thread david
Jeremy Jones wrote: > Hello all, > > does anyone know of a built-in Perl function that can divine a processes > start-time? > > EXAMPLE : > > on UNIX Systems : > >10:51:44 pts/75 0:01 xterm -e > > the underlined time is how long the process has been running. > Is there a better way

Re: Perl or Bash error?

2004-02-25 Thread John W. Krahn
Rob Dixon wrote: > > You may want to play with the cryptic internal variable $|, but > I prefer: > > use strict; > use warnings; > > use IO::Handle; > > autoflush STDOUT; > autoflush STDERR; Kind of redundant for STDERR. :-) John -- use Perl; program fulfillment -- To unsubscri

Re: 1 liner question

2004-02-25 Thread WC -Sx- Jones
chad kellerman wrote: /usr/bin/quota michele | perl -ne 'if(/none$/){print "9\n"}elsif(m:^\s+/dev/:){($q, $l)=(split(/\s+/))[2,3];$t=($l-$q)*1024};next if(!$t);{print $t."\n"}' Is none a reserved word now? I ask because quota doesnt return the same values across Unix opsys... Otherwise i

Re: get external process's output *and* return value

2004-02-25 Thread John W. Krahn
Andrew Gaffney wrote: > > Is there a way to get an external process's output *and* return value? I have a > program > that opens a pipe to 'make', process all the input, and then checks the return value > when > the loop ends (pipe is broken/closed): > > open MAKE, "make |" or die "Can't open M

RE: Changing directory and running a program

2004-02-25 Thread Wiggins d Anconia
In the midwest it is "Piece of Shit"... usually in reference to a car model... Though it doesn't seem to fit in this context ;-), sorry I couldn't resist (at least I resisted the urge to mention outsourcing/offshoring... oops). http://danconia.org > In New York it is Point of Sale , also :) >

RE: 1 liner question

2004-02-25 Thread Tim Johnson
That's not really a one-liner, that's just a script with the whitespace taken out. Just my opinion, but I thought the whole point to one-liners was to try to reduce a complex operation to its most compact form so that you could just type it at the command-line when you needed it quickly. If you

Re: RSS aggregator

2004-02-25 Thread Wiggins d Anconia
> How would I go about writing an RSS aggregator that would output to a text > file? > This seems to be a habit... you may want to start here: http://www.catb.org/~esr/faqs/smart-questions.html Having finished that, always a good place to start: http://search.cpan.org/search?query=RSS&mode=a

1 liner question

2004-02-25 Thread chad kellerman
Hello everyone... I am working on a perl one liner for adding quota on multiple partitions. But I can not, for the life of me get the number to add up.. Here is what I have: /usr/bin/quota michele | perl -ne 'if(/none$/){print "9\n"}elsif(m:^\s+/dev/:){($q, $l)=(split(/\s+/))[2

RE: RSS aggregator

2004-02-25 Thread Charles K. Clarkson
Joel <[EMAIL PROTECTED]> wrote: : : How would I go about writing an RSS aggregator that would : output to a text file? I used XML::RSS to do something similar recently. It did all the grunt work and I just used a template for the output. HTH, Charles K. Clarkson -- Mobile Homes Specialis

Re: Pattern matching problem

2004-02-25 Thread WC -Sx- Jones
Kenton Brede wrote: I just didn't want the OP to be hanging waiting for an answer when non would be forthcoming. Not a mistake per se -- however Perl people (read POD) will always want to show off -- so, if it is Perl, it is likely answered. :) -Sx- (let's not mention cpl.mod) __

Re: Pattern matching problem

2004-02-25 Thread Kenton Brede
On Wed, Feb 25, 2004 at 06:12:55PM +, Henry Todd ([EMAIL PROTECTED]) wrote: > On 2004-02-25 17:42:46 +, [EMAIL PROTECTED] (Kenton Brede) said: > > >If you don't get an answer to your question this is probably why - > > > >http://learn.perl.org/beginners-faq#2.2%20%20what%20is%20this%20list

Re: listing prime numbers in a range (Beginning Perl exercise)

2004-02-25 Thread John W. Krahn
Stuart White wrote: > > --- Rob Dixon <[EMAIL PROTECTED]> wrote: > > > > my $input = " 22 \n"; > > my @list = (2 .. $input); > > print "list first: @list\n"; > > > > **OUTPUT > > > > list first: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 > > 17 18 19 20 21 22 > > > > Does putting a space befor

Re: RSS aggregator

2004-02-25 Thread Daniel R. Anderson
Joel wrote: How would I go about writing an RSS aggregator that would output to a text file? Joel Check CPAN. There are RSS modules out there you can use and save yourself some work. -Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: listing prime numbers in a range (Beginning Perl exercise)

2004-02-25 Thread John W. Krahn
Stuart White wrote: > > > > > > Of course, then all the numbers are squished > > together. > > > (How else might I say that?) > > > > I don't know, what do you mean by "squished > > together"? > > > without spaces between each number. (it was late last > night and I had a mental block.) > > >

Re: tranfering in binmode

2004-02-25 Thread WC -Sx- Jones
Charles K. Clarkson wrote: : "Press any key to reformat your system..." Where's the [any] key? Is it only on linux computers? E'Gads! and to think I was gonna ask my wife if I could borrow the ironing board... Glad I didn't huh :) -Sx- (not sure if all this humor is lost on non-Comp

Re: tranfering in binmode

2004-02-25 Thread WC -Sx- Jones
Rob Dixon wrote: (13t m3 put 4 :-) 4ft3r lvly .sig - 5o winz p33pz n03 l'lvl t345l/\/g th3lvl...) There is no Convert::L33T There is Convert::Translit (for the more acadamia p33pz) But (gr33t5) ol' H4x0r5 may want to see: Jerome Quelin > Acme-Tie-Eleet-0.33 > Acme::Tie::Eleet -Sx- (although

Re: Pattern matching problem

2004-02-25 Thread Kenton Brede
On Wed, Feb 25, 2004 at 06:30:55PM -, Rob Dixon ([EMAIL PROTECTED]) wrote: > Kenton Brede wrote: > > > > On Wed, Feb 25, 2004 at 05:52:19PM -, Rob Dixon ([EMAIL PROTECTED]) wrote: > > > Kenton Brede wrote: > > > > > > > > > I'm having trouble counting the number of specific substrings withi

RE: tranfering in binmode

2004-02-25 Thread Charles K. Clarkson
WC -Sx- Jones <[EMAIL PROTECTED]> wrote: : : But wait!!! Hope has arrived ... : : : "Press any key to reformat your system..." Where's the [any] key? Is it only on linux computers? Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PRO

Re: Changing directory and running a program

2004-02-25 Thread John W. Krahn
Ned Cunningham wrote: > > HI all. Hello, > Can anybody tell me how to execute a command "remotely" in a Perl script from > a different directory. Please keep in mind I am asking what I want, not what you > think I meant to say. > > I need to: > > ('cd /d e:\ned\nedsdir`); You are running the

Re: tranfering in binmode

2004-02-25 Thread Rob Dixon
Wc -Sx- Jones wrote: > > Rob Dixon wrote: > > > But seriously, what sort of answer do you want to a question that says, > > "I have a PC. It doesn't work. Please help,"? We don't do house calls. > > But wait!!! Hope has arrived ... > > "Press any key to reformat your system..." > > > (13t m3 put 4

Re: Pattern matching problem

2004-02-25 Thread Rob Dixon
Henry Todd wrote: > > On 2004-02-25 17:42:46 +, [EMAIL PROTECTED] (Kenton Brede) said: > > > If you don't get an answer to your question this is probably why - > > > > http://learn.perl.org/beginners-faq#2.2%20%20what%20is%20this%20list%20_not_%20for > > Thanks for the pointer. I should have re

Re: Pattern matching problem

2004-02-25 Thread John W. Krahn
Henry Todd wrote: > > I'm having trouble counting the number of specific substrings within a > string. I'm working on a bioinformatics coursework at the moment, so my > string looks like this: > > $sequence = "caggaactttcggaagaccatgta"; > > I want to count the number of occurrences of each p

Re: Pattern matching problem

2004-02-25 Thread david
Henry Todd wrote: [snip] > > This is how I'm counting the number of "cc" pairs at the moment ($cc is > my counter variable): > > $cc++ while $sequence =~ /cc/gi; > > But this only matches the literal string "cc", so if, as it scans > $sequence, it finds "" it's only counting it once instea

Re: Pattern matching problem

2004-02-25 Thread Rob Dixon
Kenton Brede wrote: > > On Wed, Feb 25, 2004 at 05:52:19PM -, Rob Dixon ([EMAIL PROTECTED]) wrote: > > Kenton Brede wrote: > > > > > > > I'm having trouble counting the number of specific substrings within a > > > > string. I'm working on a bioinformatics coursework at the moment, so my > > > >

RE: Changing directory and running a program

2004-02-25 Thread Bob Showalter
Ned Cunningham wrote: > HI all. > > Can anybody tell me how to execute a command "remotely" in a Perl > script from a different directory. > Please keep in mind I am asking what I want, not what you think I > meant to say. > > I need to: > > ('cd /d e:\ned\nedsdir`); > (`runprogram.exe -optio

Re: Changing directory and running a program

2004-02-25 Thread Tim
At 01:01 PM 2/25/04 -0500, you wrote: HI all. Can anybody tell me how to execute a command "remotely" in a Perl script from a different directory. Please keep in mind I am asking what I want, not what you think I meant to say. I need to: ('cd /d e:\ned\nedsdir`); (`runprogram.exe -option - op

RE: Changing directory and running a program

2004-02-25 Thread Ned Cunningham
In New York it is Point of Sale , also :) Ned Cunningham POS Systems Development Monro Muffler Brake 200 Holleder Parkway Rochester, NY 14615 (585) 647-6400 ext. 310 [EMAIL PROTECTED] -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED]

Re: tranfering in binmode

2004-02-25 Thread WC -Sx- Jones
Rob Dixon wrote: But seriously, what sort of answer do you want to a question that says, "I have a PC. It doesn't work. Please help,"? We don't do house calls. But wait!!! Hope has arrived ... "Press any key to reformat your system..." (13t m3 put 4 :-) 4ft3r lvly .sig - 5o winz p33pz n03 l'lvl

Re: Changing directory and running a program

2004-02-25 Thread Rob Dixon
Ned Cunningham wrote: > POS Systems Development What's a POS? In England it's Point Of Sale. /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Pattern matching problem

2004-02-25 Thread Henry Todd
On 2004-02-25 17:42:46 +, [EMAIL PROTECTED] (Kenton Brede) said: If you don't get an answer to your question this is probably why - http://learn.perl.org/beginners-faq#2.2%20%20what%20is%20this%20list%20_not_%20for Kent Kent Kent Kent - Thanks for the pointer. I should have read the list

Re: Pattern matching problem

2004-02-25 Thread Kenton Brede
On Wed, Feb 25, 2004 at 05:52:19PM -, Rob Dixon ([EMAIL PROTECTED]) wrote: > Kenton Brede wrote: > > > > > I'm having trouble counting the number of specific substrings within a > > > string. I'm working on a bioinformatics coursework at the moment, so my > > > string looks like this: > > > > I

Changing directory and running a program

2004-02-25 Thread Ned Cunningham
HI all. Can anybody tell me how to execute a command "remotely" in a Perl script from a different directory. Please keep in mind I am asking what I want, not what you think I meant to say. I need to: ('cd /d e:\ned\nedsdir`); (`runprogram.exe -option - option -option`); The program needs to

Re: tranfering in binmode

2004-02-25 Thread Rob Dixon
John wrote: > > I want to transfer a document from a win32 to unix system via Net::FTP but the > operation fails (file is not sent properly) > > i have set up the VsFTPD on a linux system. > > Do you know what caused the failure? Yes. It was me. I had my meter prod shorting pins 20 and 7 on the se

Re: Pattern matching problem

2004-02-25 Thread Rob Dixon
Kenton Brede wrote: > > > I'm having trouble counting the number of specific substrings within a > > string. I'm working on a bioinformatics coursework at the moment, so my > > string looks like this: > > If you don't get an answer to your question this is probably why - > > http://learn.perl.org/b

RE: Pattern matching problem

2004-02-25 Thread Bakken, Luke
> I'm having trouble counting the number of specific substrings > within a > string. I'm working on a bioinformatics coursework at the > moment, so my > string looks like this: > > $sequence = "caggaactttcggaagaccatgta"; > > I want to count the number of occurrences of each pair of > let

Re: tranfering in binmode

2004-02-25 Thread John
I fixed it. binary() method is required! - Original Message - From: "Oliver Schnarchendorf" <[EMAIL PROTECTED]> To: "John" <[EMAIL PROTECTED]> Cc: "Perl Beginners" <[EMAIL PROTECTED]> Sent: Wednesday, February 25, 2004 7:42 PM Subject: Re: tranfering in binmode > On Wed, 25 Feb 2004 1

list bounces

2004-02-25 Thread WC -Sx- Jones
2FF - Is this person ever going to be unsub'ed or what? [maybe the autobots are dead now?] --- the bounce: Your message To: [EMAIL PROTECTED] Subject: Re: Counting frequency of words. was undeliverable due to the following reason: [EMAIL PROTECTED] - User doesn't exist or is inactive. ...

Re: Perl Newbie

2004-02-25 Thread WC -Sx- Jones
David le Blanc wrote: You should probably be castrated for that most incredibly obtuse excuse for help.. You want to get a NEWBIE performing lan sniffing and performing TCP packet decoding as a first attempt at TCP interprocess comms? That's pure nastiness! Heh, well, it's not a beginners subje

Re: Pattern matching problem

2004-02-25 Thread Kenton Brede
On Wed, Feb 25, 2004 at 04:35:57PM +, Henry Todd ([EMAIL PROTECTED]) wrote: > I'm having trouble counting the number of specific substrings within a > string. I'm working on a bioinformatics coursework at the moment, so my > string looks like this: If you don't get an answer to your question

Re: tranfering in binmode

2004-02-25 Thread Oliver Schnarchendorf
On Wed, 25 Feb 2004 19:34:10 +0200, John wrote: > Here is the output > [...] > Net::FTP=GLOB(0x1ab2694)<<< 150 Ok to send data. > Net::FTP=GLOB(0x1ab2694)<<< 226 File receive OK. > Net::FTP=GLOB(0x1ab2694)>>> QUIT > Net::FTP=GLOB(0x1ab2694)<<< 221 Goodbye. > [...] Hm, it seems that your problem cea

RSS aggregator

2004-02-25 Thread Joel
How would I go about writing an RSS aggregator that would output to a text file? Joel -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: tranfering in binmode

2004-02-25 Thread John
Here is the output Net::FTP: Net::FTP(2.65) Net::FTP: Exporter(5.562) Net::FTP: Net::Cmd(2.21) Net::FTP: IO::Socket::INET(1.25) Net::FTP: IO::Socket(1.26) Net::FTP: IO::Handle(1.21) Net::FTP=GLOB(0x1ab2694)<<< 220 (vsFTPd 1.2.0) Net::FTP=GLOB(0x1ab2694)>>> user test Net::FTP=GLOB

Re: Counting frequency of words.

2004-02-25 Thread WC -Sx- Jones
[... an oldie but a goodie -- don't remember the original author. -Sx-] =pod #!C:\perl\bin\perl.exe #!/usr/bin/perl # A Perl filter that will take the selected text, sort the # words, put into a column, remove duplicates, then output a # word count by each. use strict; my %count; while () {

Pattern matching problem

2004-02-25 Thread Henry Todd
I'm having trouble counting the number of specific substrings within a string. I'm working on a bioinformatics coursework at the moment, so my string looks like this: $sequence = "caggaactttcggaagaccatgta"; I want to count the number of occurrences of each pair of letters, for example: Num

Re: Perl or Bash error?

2004-02-25 Thread juman
Thanks for the tips... they solved my problems... /juman On Wed, Feb 25, 2004 at 02:56:48PM +0100, juman wrote: > I'm trying to make perl print out some status info while doing other > things but the actual text isn't shown until a newline character is > passes. > > print "Before"; > sleep (5);

Re: tranfering in binmode

2004-02-25 Thread Oliver Schnarchendorf
On Wed, 25 Feb 2004 18:52:28 +0200, John wrote: > I want to transfer a document from a win32 to unix system via > Net::FTP but the operation fails (file is not sent properly) > > i have set up the VsFTPD on a linux system. > > Do you know what caused the failure? No idea whatsoever... yet I coul

Re: File name comparisons?

2004-02-25 Thread Jas
t... 1. List files on remote machine correct 2. Step through list of files sorting into a list that we can then retrieve all but the 30 newest also correct 3. Step through list of files needing deletion, deleting them from the remote source. and again, correct 'eval' should be unnecessary.

tranfering in binmode

2004-02-25 Thread John
I want to transfer a document from a win32 to unix system via Net::FTP but the operation fails (file is not sent properly) i have set up the VsFTPD on a linux system. Do you know what caused the failure?

Re: cool project ideas

2004-02-25 Thread John
Then what is the correct method? I have installed the Image::Magick via the ppm (activestate, win32 perl) I haven't install any other lib during ImageMagick installation. And it works great. But with no GIF images as i can see. PNG is a heavy format as far as i know. I want the smallest image

RE: PERL on 9.2 and XP Prof.

2004-02-25 Thread Paul Kraus
http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.3.809 -MSWin32-x86.msi download this msi file. Install. Read the docs. And use PPM to install cpan modules. > -Original Message- > From: KENNETH JANUSZ [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 25, 2004 10:

Re: PERL on 9.2 and XP Prof.

2004-02-25 Thread Rob Dixon
Kenneth Janusz wrote: > > Platform: Dell 8400 with 9.2 and XP Prof. SP1 > > I have read a lot of documentation and still can't get PERL to work on my PC. > Can someone step me through the process. Please keep it simple because I am new > to PERL and don't have a good understanding of the jargon.

Re: Perl or Bash error?

2004-02-25 Thread Rob Dixon
Juman wrote: > > I'm trying to make perl print out some status info while doing other > things but the actual text isn't shown until a newline character is > passes. > > print "Before"; > sleep (5); > print "After\n"; > > This test will print "BeforeAfter" after 5 seconds sleep? How do I make > it

PERL on 9.2 and XP Prof.

2004-02-25 Thread KENNETH JANUSZ
Platform: Dell 8400 with 9.2 and XP Prof. SP1 I have read a lot of documentation and still can't get PERL to work on my PC. Can someone step me through the process. Please keep it simple because I am new to PERL and don't have a good understanding of the jargon. My Oracle 9.2 has PERL instal

Re: get external process's output *and* return value

2004-02-25 Thread Wiggins d Anconia
> Is there a way to get an external process's output *and* return value? I have a program > that opens a pipe to 'make', process all the input, and then checks the return value when > the loop ends (pipe is broken/closed): > > open MAKE, "make |" or die "Can't open MAKE pipe"; > > while() { >

creating and/or converting pdf files to screen reader HTML format

2004-02-25 Thread William.Ampeh
Hello, Question 1: How do I convert tables in pdf format to 508 compliant HTML files. Using existing tools in xpdf, I am able to convert pdf files to text, and hence with minimal Perl scripting able to create HTML tables. My boss, however, want these files to be 508 complaint. Are there any

Re: cool project ideas

2004-02-25 Thread isofroni
Then what is the correct method? I have installed the Image::Magick via the ppm (activestate, win32 perl) I haven't install any other lib during ImageMagick installation. And it works great. But with no GIF images as i can see. PNG is a heavy format as far as i know. I want the smallest image

Re: get external process's output *and* return value

2004-02-25 Thread William.Ampeh
Use my $status = $?>>8 >From your code, I could not tell how yoy were running MAKE (you were only processing items in the make file). So Assuming you were running "make -f my_makefile". Then this should do it. #!/opt/local/bin/perl $foo=`make -f my_makefile`; #you could replace line with

  1   2   >