regular expression that doesn't match any string [repost as thread root]

2004-02-25 Thread R. Joseph Newton
Reposted as new thread: [Note: I am reposting this as a new message, in order to start a new thread. Please remember to use the new message command, rather than a reply, when starting a new subject. For many of us with threaded browsers, your message got lost way out on an unrelated thread.--Jos

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

2004-02-25 Thread Ohad Ohad
I'm not sure why (assuming it will work) you think it will give you prime numbers . . . You could try this: perl -e 'print"@{[grep{(1x$_)!~/^(11+?)\1+$/}2..shift||1e2]}\n"' This will print all primes between 2 and Probably not what you wanted, and the explanation of why it works is quite tedi

Re: cool project ideas

2004-02-25 Thread John
Unfortunately i cannot install Imager - Installing package 'Imager'... Error installing package 'Imager': Read a PPD for 'Imager', but it is not intended for this build of Perl (MSWin32-x86-multi-thread) PPM> exit Quit! C:\DOCUME~1\ADMINI~1>perl

Perl / Tk Gui Toolkit?

2004-02-25 Thread Bastian Angerstein
Hi has anybody expirience with GUI Toolkit for Perl/Kit? Which would you recommend for Solaris or Windows? Thanks Bastian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: cool project ideas

2004-02-25 Thread John
Unfortunately, Image::Magick doen't support gif compression. Here is my script use Image::Magick; my $image; $image = Image::Magick->new; $image->Read('test.bmp'); $image->Resize(geometry=>'800x800'); $image->Write(filename=>'test.gif', compression => 'JPEG', quality=>1, monochrome =>True);

Reading File & grep according item 5 and sorting

2004-02-25 Thread Bjorn Van Blanckenberg
let say that the file contains these items (every item is seperated with a tab) one title state name testing number two title2 state2 name2 final number2 one title3 state3 name3 pre number3 four title4 state4 name4 tesing2 number4 six title5 state5 name5 t

RE: regular expression that doesn't match any string

2004-02-25 Thread Tim Johnson
I believe the '.' character does not have the same special meaning within a character class, and that's why it isn't matching what you think it does. You should check out the YAPE::Regex::Explain module. It's great for debugging regular expressions. -Original Message-

RE: Constructors (was: RE: deleting a hash ref's contents)

2004-02-25 Thread David le Blanc
> -Original Message- > From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 25 February 2004 5:05 PM > To: [EMAIL PROTECTED] > Subject: Constructors (was: RE: deleting a hash ref's contents) > > Hello all, > > The following thread was part of a reply written a while

Counting frequency of words.

2004-02-25 Thread Vishal Vasan
Hello All, I have to find the frequency of occurance of all (mail code: This is the first 8 characters of the line) in a huge file. Instead of doing it in C I am trying it out in perl. I am trying hashes for this. Whenever a new code comes, the count has to be incremented. This is the code tha

Frequency of words

2004-02-25 Thread Vishal Vasan
Hi All, It has worked. Many Thanks, Regards, Vishal Vasan. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Perl Newbie

2004-02-25 Thread David le Blanc
> -Original Message- > From: WC -Sx- Jones 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! No

Re: Counting frequency of words.

2004-02-25 Thread Rob Dixon
Vishal Vasan wrote: > > I have to find the frequency of occurance of all (mail code: This is the > first 8 characters of the line) in a huge file. Instead of doing it in C > I am trying it out in perl. I am trying hashes for this. Whenever a new > code comes, the count has to be incremented. > > Th

Re: regular expression that doesn't match any string

2004-02-25 Thread John W. Krahn
Öznur tastan wrote: > > Hi all Hello, > Just for fun (really no context) i was wondering how to create regular > expressions that > will never match any string. > > /^[^\w\W]/ is one of them am I right? No string can start with a character > that is neither alphanumeric nor nonalhanumeric. >

Re: Rounding of floating point numbers

2004-02-25 Thread zsdc
Zielfelder, Robert wrote: I suspected that this was the intentional behavior of the function. For what I am trying to do, I don't think "banker's rounding" will work. Not being a "real" programmer, perhaps I am approaching my problem from the wrong angle. [...] From what you've described, using

Re: Perl Newbie

2004-02-25 Thread Rob Dixon
David Le Blanc wrote: > > -Original Message- > From: WC -Sx- Jones You should probably be castrated for that most incredibly obtuse excuse for help. Do you more about Sx's gender than I do? ;) Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR

RE: Perl Newbie

2004-02-25 Thread David le Blanc
> -Original Message- > From: Rob Dixon [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 25 February 2004 10:04 PM > To: [EMAIL PROTECTED] > Subject: Re: Perl Newbie > > David Le Blanc wrote: > > > > -Original Message- > > From: WC -Sx- Jones > > You should probably be castrated for t

Re: regular expression that doesn't match any string

2004-02-25 Thread Rob Dixon
Öznur tastan wrote: > > Just for fun (really no context) i was wondering how to create regular > expressions that will never match any string. It's a strange leisure activity, but how about /[^\Q$string\E]/ which will never match $string. /R -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: regular expression that doesn't match any string

2004-02-25 Thread Öznur Taştan
- Original Message - From: "Rob Dixon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 25, 2004 1:20 PM Subject: Re: regular expression that doesn't match any string > Öznur tastan wrote: > > > > Just for fun (really no context) i was wondering how to create regular

finding Process run time

2004-02-25 Thread Jones, Jeremy
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, using pre-packaged Mods to find this out

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

2004-02-25 Thread Stuart White
> > 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.) > > So my solution is to > > "stringify" the ar

Re: Perl / Tk Gui Toolkit?

2004-02-25 Thread Benjamin Walkenhorst
Hello, I recently started learning Perl/Tk. My primary system is FreeBSD 5.2, on which Perl/Tk works fine. At work, I have to use windows, unfortunately, but it works fine, too, under Windows. I don't see why it should not work with Solaris. So far, I like Perl/Tk very much. I did not have any pr

Re: Perl Newbie

2004-02-25 Thread Rob Dixon
David Le Blanc wrote: > > Actually, I'd better apologise for calling RPC::p* > secure, simple, or well documented, before anyone comes > at me with a knife :-( You won't feel a thing. Trust me: I'm an analyst. /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

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

2004-02-25 Thread Rob Dixon
Hi Stuart. 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 bloc

Re: Perl / Tk Gui Toolkit?

2004-02-25 Thread John
Do you know any major malling list or forum concerning the Perl/Tk ? - Original Message - From: "Benjamin Walkenhorst" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, February 25, 2004 3:04 PM Subject: Re: Perl / Tk Gui Toolkit? > Hello, > > I rece

RE: Perl / Tk Gui Toolkit?

2004-02-25 Thread NYIMI Jose (BMB)
Search tk from http://lists.perl.org José. -Original Message- From: John [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 2:29 PM To: [EMAIL PROTECTED] Subject: Re: Perl / Tk Gui Toolkit? Do you know any major malling list or forum concerning the Perl/Tk ? - Original

get external process's output *and* return value

2004-02-25 Thread Andrew Gaffney
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() { # Process input

Perl or Bash error?

2004-02-25 Thread juman
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 print "Before" sleep 5 seconds an

Re: Perl or Bash error?

2004-02-25 Thread Morbus Iff
>print "Before"; >sleep (5); >print "After\n"; You're buffering, I suspect. Add $|=1 to the top of your script, and read: http://perl.plover.com/FAQs/Buffering.html -- Morbus Iff ( i put the demon back in codemonkey ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Spidering Hacks: h

Re: Constructors (was: RE: deleting a hash ref's contents)

2004-02-25 Thread James Edward Gray II
On Feb 25, 2004, at 12:05 AM, Charles K. Clarkson wrote: Hello all, The following thread was part of a reply written a while back. R. Joseph Newton <[EMAIL PROTECTED]> wrote: : : Gary Stainburn wrote: : : > sub new { : > my $this=shift;# allow for CLASS->new() : > my $cla

Re: regular expression that doesn't match any string [repost as thread root]

2004-02-25 Thread Jenda Krynicky
From: "R. Joseph Newton" <[EMAIL PROTECTED]> > Reposted as new thread: > > [Note: I am reposting this as a new message, in order to start a new > thread. Please remember to use the new message command, rather than a > reply, when starting a new subject. For many of us with threaded > browsers, y

Re: Constructors (was: RE: deleting a hash ref's contents)

2004-02-25 Thread R. Joseph Newton
"Charles K. Clarkson" wrote: > Hello all, > > The following thread was part of a reply written a while back. > > R. Joseph Newton <[EMAIL PROTECTED]> wrote: > : > : Gary Stainburn wrote: > : > : > sub new { > : > my $this=shift;# allow for CLASS->new() > : > my $class=ref($

Re: Constructors (was: RE: deleting a hash ref's contents)

2004-02-25 Thread R. Joseph Newton
"Charles K. Clarkson" wrote: > Hello all, > > The following thread was part of a reply written a while back. Whoops. Missed it on my earlier post. > This constructor: > sub new { > my $class = shift; > my $self = { > file_name => undef, > base=> undef, >

Re: finding Process run time

2004-02-25 Thread Wiggins d Anconia
> 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, using pre-pac

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

2004-02-25 Thread Stuart White
--- Rob Dixon <[EMAIL PROTECTED]> wrote: > Hi Stuart. Mornin' Rob. > My guess is that you're looking at the output from > > print @list; 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 n

Re: cool project ideas

2004-02-25 Thread Wiggins d Anconia
Please bottom post... > Unfortunately, Image::Magick doen't support gif compression. > GIF compression or GIF images? Image::Magick will support any format that the underlying imagemagick C libs can support, they can support GIF images, but that depends on having libgif or giflib (or some such l

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

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

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: 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() { >

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: 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

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 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: 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

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: 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.

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: 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);

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: 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 () {

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

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 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

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: 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

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: 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

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: 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: 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

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: 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

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: 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: 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 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: 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 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: 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: 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 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 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: 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: 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 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: 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 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: 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: 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: 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: > > --- 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: 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: 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: 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

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 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

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: 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: 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: 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: 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: 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: 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

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: 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

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: 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

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 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 > "

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

  1   2   >