Re: rearrange text
--On Monday, August 25, 2003 6:50 PM -0400 Mike Robeson <[EMAIL PROTECTED]> wrote: OK, I feel like an idiot. When I initially asked for help with this I just realized that I forgot two little details. I was supposed to add the number of sequences as well as the length of the sequences at the top of the output file. That is this file: dog agatagatcgcatcga cat acgcttcgatacgctagctta mouse agatatacgggtt is relly supposed to be: 3 22 a g a t a g a t c g c a t c g a - - - - - -dog a c g c t t c g a t a c g c t a g c t t a -cat a g a t a t a c g g g t t - - - - - - - - -mouse The '3' represents the number of individual sequences in the file (i.e. dog, cat, mouse). And the 22 is the number of letters and dashes there are. The length is already in the script as $len. I am able to get the length listed at the top. However, I cannot find a way to have the number of sequences (the 3 in this case) printed to the top. Here's one way (slightly altering John's solution), but it will use lots of memory if the sequences are long. #!/usr/bin/perl use warnings; use strict; my ($name, $num_seq, @seq); my $len = 30; while ( ) { unless ( /^\s*$/ or s/^\s*>(\S+)// ) { my $name = $1; my @char = ( /[acgt]/g, ( '-' ) x $len )[ 0 .. $len - 1 ]; push @seq, "@char$name"; $num_seq++; } } { local $" ="\n"; print "[EMAIL PROTECTED]"; } __DATA__ > dog agatagatcgcatcga > cat acgcttcgatacgctagctta > mouse agatatacgggt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Perl Codes Written in Windows Env
Hanson, Rob wrote: > ... Unix uses the sh'bang to determine > where the Perl binary is, and Unix (not Perl) can't understand the > carriage-return character. A minor nit: UNIX "understands" the CR character perfectly; it simply treats it as part of the file name, since it's a legal character. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form Paragraph
I have a form paragraph that once it has more than 1975 characters in it, the submit button on the form will not work. Any ideas? Thank you in advance, Ryan Whippo -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Perl 5.6 Installation for Windows 2003 Server
Smith Jeff D wrote: I've been looking for help on installing Perl 5.6 for Windows 2003. I downloaded Activestate's MSI executable but it gets hung up on the "Wrong OS" since Acitvestate provides a Windows 2000 but not a 2003 version. Has anyone else had this issue and worked around the standard installation from Activestate? I've posed this to the Activestate support desk too. You can get the source from CPAN and build it yourself: http://www.cpan.org/src/README.html Or you can get prebuilt binaries from many places other than ActiveState: http://www.cpan.org/ports/index.html#win32 -zsdc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: rearrange text
OK, I feel like an idiot. When I initially asked for help with this I just realized that I forgot two little details. I was supposed to add the number of sequences as well as the length of the sequences at the top of the output file. That is this file: >dog agatagatcgcatcga >cat acgcttcgatacgctagctta >mouse agatatacgggtt is relly supposed to be: 3 22 a g a t a g a t c g c a t c g a - - - - - -dog a c g c t t c g a t a c g c t a g c t t a -cat a g a t a t a c g g g t t - - - - - - - - -mouse The '3' represents the number of individual sequences in the file (i.e. dog, cat, mouse). And the 22 is the number of letters and dashes there are. The length is already in the script as $len. I am able to get the length listed at the top. However, I cannot find a way to have the number of sequences (the 3 in this case) printed to the top. Is there a way that I can just append to the outfile at the begining of a file? Sorry, about this. I didn't realize I forgot to include this info. I guess I am to busy trying to learn PERL and I am not paying attention to what I need PERL to do for me! :-) -Thanks -Mike In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John W. Krahn) wrote: > Mike Robeson wrote: > > > > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John W. Krahn) > > wrote: > > > > > Mike Robeson wrote: > > > > > > > > I do not know what happend but the text didn't get formatted correctly > > > > on the list. But this is how the out put should really have been: > > > > > > > > a g a t a g a t c g c a t c g a - - - - - -dog > > > > a c g c t t c g a t a c g c t a g c t t a -cat > > > > a g a t a t a c g g g t t - - - - - - - - -mouse > > > > > > > > That is, I want the edited sequence data and the name on the same line. > > > > > > #!/usr/bin/perl > > > use warnings; > > > use strict; > > > > > > my $len = 30; > > > my $name; > > > while ( ) { > > > chomp; > > > unless ( s/^\s*>(.+)// ) { > > > $name = $1; > > > my @char = ( split( // ), ( '-' ) x ( $len - length ) ); > > > print "@char$name\n"; > > > } > > > } > > > > > > __DATA__ > > > >dog > > > agatagatcgcatcga > > > >cat > > > acgcttcgatacgctagctta > > > >mouse > > > agatatacgggt > > > > Thanks for the help!! I new it had to be simple... but I just didn't see > > it! I just need to add some more code to it but I think I can take it > > from here. > > You can make that a bit more robust. :-) > > #!/usr/bin/perl > use warnings; > use strict; > > my $len = 30; > while ( ) { > unless ( /^\s*$/ or s/^\s*>(\S+)// ) { > my $name = $1; > my @char = ( /[acgt]/g, ( '-' ) x $len )[ 0 .. $len - 1 ]; > print "@char$name\n"; > } > } > > __DATA__ > >dog > agatagatcgcatcga > >cat > acgcttcgatacgctagctta > >mouse > agatatacgggt > > > > John -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Software Design - Software Management - Project Management
On Mon, Aug 25, 2003 at 06:08:05PM -0400, Paul Kraus wrote: > Why do you guys do when designing a software? Do your write out pseudo > code and then flow chart it? I thought Perl was just executable pseudo code. And flow charts? I haven't seen one of those for twenty years :-) > What do you do to keep track of notes and ideas and project information. > > I am literally swamped with projects ranging from perl to BASIC to tbred > script development and I am getting messed up keeping everything > straight. I have about 20 different projects going right now and its > hard to remember where left off and on what. I am using Outlook tasks to > try and manage this buts a pain in the ass. I bet it's hard. There's no way you can work on the development of twenty projects simultaneously. Really, this is your problem. If you can cut that number down to two, or at most three, but ideally one, then you won't need software to remember what you were doing for you. With twenty projects they are getting an average of 2 hours a week maximum, I would assume (though I'm sure you don't work on all twenty each week). That's not enough time to get up to speed, let alone do anything productive. It's the human equivalent of thrashing. If you want to actually get any work done you have to concentrate on a particular project for a while. That way you will get through the twenty much quicker. You might like to take a look at some of the ideas from XP (that's extreme programming). Type that into google and poke around for a bit. They have some interesting ideas on these topics. Things that many people have been doing for years, but are now becoming formalised and recognised (by some) as good practice. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Software Design - Software Management - Project Management
Why do you guys do when designing a software? Do your write out pseudo code and then flow chart it? What do you do to keep track of notes and ideas and project information. I am literally swamped with projects ranging from perl to BASIC to tbred script development and I am getting messed up keeping everything straight. I have about 20 different projects going right now and its hard to remember where left off and on what. I am using Outlook tasks to try and manage this buts a pain in the ass. I wish there was a piece of software that would let me see all my projects that I am working on. Then click the project and see all the tasks I have left, notes I have made, design flow charts What ever. How do you pro's out there handle these things. What software do you use. I am developing on a windows xp machine but also work on UNIX and Linux. So we can keep the thread flexible to kind of help everyone. I think this a topic everybody can benefit from. Even if its not 100% perl related is something we all on this list have to deal with. I touched this topic about 8 months ago but things have gotten more chaotic and thought I would get some fresh ideas. Paul Kraus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FILEHANDLE to print to nothing
There is always /dev/null if you really want it to go to the big bit bucket in the sky. Chuck [EMAIL PROTECTED] wrote: Sure, just use this without an open or close statement... print VOID 'test'; I'm not exactly sure how Perl handles this, but since there is no filehandle called VOID is just goes away. I wouldn't leave this in there when it goes into production, but it shouldn't cause any problems during testing. Rob -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 5:24 PM To: [EMAIL PROTECTED] Subject: FILEHANDLE to print to nothing Howdy, I am benchmarking some stuff that does multiple print staements. What I'd like to do is print to a file handel so ethat the stuff I'm printing doesn't go to the screen. Ie instead of print "stuff"; print BITBUCKET "stuff"; That way the output of the benchmark test won't be screwy on the terminal or cause 500 errors if someone runs this test before an html header gets printed. Any ideas of how to create a filehandle to the void? open(VOID,''); print VOID 'test'; close VOID; TIA Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FILEHANDLE to print to nothing
> Sure, just use this without an open or close statement... > > print VOID 'test'; > Cool, great for the test! > I'm not exactly sure how Perl handles this, but since there > is no filehandle called VOID is just goes away. > Struct is ok with that but warnings is not. > I wouldn't leave this in there when it goes into production, > but it shouldn't cause any problems during testing. > I need a way do a print statemnet and not have it displayed even once it is production. Any ideas anyone? Thanks Rob! > Rob > > -Original Message- > From: Dan Muey [mailto:[EMAIL PROTECTED] > Sent: Monday, August 25, 2003 5:24 PM > To: [EMAIL PROTECTED] > Subject: FILEHANDLE to print to nothing > > > Howdy, > > I am benchmarking some stuff that does multiple print staements. > > What I'd like to do is print to a file handel so ethat the > stuff I'm printing doesn't go to the screen. > > Ie instead of print "stuff"; > print BITBUCKET "stuff"; > > That way the output of the benchmark test won't be screwy on > the terminal or cause 500 errors if someone runs this test > before an html header gets printed. > > Any ideas of how to create a filehandle to the void? > > open(VOID,''); > print VOID 'test'; > close VOID; > > TIA > > Dan > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pronunciation guide
8:58am, Randal L. Schwartz wrote: > > "Arthaey" == Arthaey Angosii <[EMAIL PROTECTED]> writes: > > Arthaey> I have heard <=> as "spaceship" and <> as the "diamond" operator. > > Larry's daughter Heidi came up with "diamond". And I'm the culprit > responsible for "spaceship". > > -- And we (I, anyway) thank you. I got a good laugh out of that today when I told my class that's what it was called--"no, really, that's it's name..." Paul Archer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pronunciation guide
4:53pm, Paul Johnson wrote: > Paul Kraus said: > > > Wow. I find that unusual in my 10 years of computer use/programming ... > > I have always referred to $ and heard it referred to as "string". > > > > Not that it matters but I find that definitely unusual :) > > Do you have a background in BASIC? I think that in the UK at least it is > (was ?) common to refer to the $ in A$, for example, as "string" since > that is what it was, and it obviously had nothing to do with dollars. > > But as far as Perl is concerned it is "dollar", and I am not aware of any > exceptions. > > Now, as to whether $! is dollar-bang, dollar-pling, > dollar-exclamation-mark or anything else is not so easy. > I thought it was a "bang for your buck"... > You might find this link interesting: > > http://www.eeng.brad.ac.uk/help/.faq/.unix/.pronun.html > Good link, thanks. > But people, # is not a pound! ;-) > Of course not, it's an octothorpe. Everyone knows that. Paul PS. What's with the Pauls here? Are Pauls particularly passionate about Perl, or primarily pronunciation? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FILEHANDLE to print to nothing
Sure, just use this without an open or close statement... print VOID 'test'; I'm not exactly sure how Perl handles this, but since there is no filehandle called VOID is just goes away. I wouldn't leave this in there when it goes into production, but it shouldn't cause any problems during testing. Rob -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 5:24 PM To: [EMAIL PROTECTED] Subject: FILEHANDLE to print to nothing Howdy, I am benchmarking some stuff that does multiple print staements. What I'd like to do is print to a file handel so ethat the stuff I'm printing doesn't go to the screen. Ie instead of print "stuff"; print BITBUCKET "stuff"; That way the output of the benchmark test won't be screwy on the terminal or cause 500 errors if someone runs this test before an html header gets printed. Any ideas of how to create a filehandle to the void? open(VOID,''); print VOID 'test'; close VOID; TIA Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FILEHANDLE to print to nothing
Howdy, I am benchmarking some stuff that does multiple print staements. What I'd like to do is print to a file handel so ethat the stuff I'm printing doesn't go to the screen. Ie instead of print "stuff"; print BITBUCKET "stuff"; That way the output of the benchmark test won't be screwy on the terminal or cause 500 errors if someone runs this test before an html header gets printed. Any ideas of how to create a filehandle to the void? open(VOID,''); print VOID 'test'; close VOID; TIA Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Perl Codes Written in Windows Env
The big problem is line endings. On WinBlows you need carriage return and line feed (ascii 13 and 10, respectively). However on (*nix) lines are terminated by line feed. By transferring in binary mode, you will see ^M at the end of line (remember ascii 13 ?). This alone should not cause any issues with running Perl scripts, I have done this many times. BTW, there is a nifty little program called dos2unix (not sure if this is standard for all (*nix)), that removes extraneous carriage returns from files. Chuck Fox [EMAIL PROTECTED] wrote: I have a perl script that I developped in a windows machine and it had to be transfered by ftp to a UNIX server. The codes worked fine when I tested them on my windows machine. Is it true that the data could get corrupted while being ftp'ed from Windows to Unix. I was told by the Unix people If you ftp them in binary mode instead of ascii mode yes that will screw it up. that they couldn't get the code to work at first because the codes were developped in windows What do you mean by "didn't work". They failed completely, output not as expected, ... What modules did you use? Are those installed on the unix host? What errors are you getting? To the screen or a log of some kind? environment. Codes are working now though. Just being curious.
Perl Codes Written in Windows Env
I have a perl script that I developped in a windows machine and it had to be transfered by ftp to a UNIX server. The codes worked fine when I tested them on my windows machine. Is it true that the data could get corrupted while being ftp'ed from Windows to Unix. I was told by the Unix people that they couldn't get the code to work at first because the codes were developped in windows environment. Codes are working now though. Just being curious. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Perl Codes Written in Windows Env
> If you ftp them in binary mode instead of > ascii mode yes that will screw it up. I wanted to elaborate on this since this is a common issue for the unknowing. When you tell FTP to use "binary" mode it doesn't modify the file, it just copies it byte by byte. If you tell it to use "ascii" mode, then it will adjust the line endings depending on the source and destination systems. When you FTP a text file (including code) between different environments be sure to use "ascii" mode as it will convert the line endings as appropriate. In general I don't think Perl cares about line endings too much, I think it can handle most of them (I may be wrong). ...The root of the problem is the sh'bang line. Unix uses the sh'bang to determine where the Perl binary is, and Unix (not Perl) can't understand the carriage-return character. In general I don't think this is an issue if you go from Unix to Windows. Since Windows generally uses the file extension to determine what kind of app it is, and doesn't actually need to peek at the file like Unix does. Rob -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 4:46 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Perl Codes Written in Windows Env > I have a perl script that I developped in a windows machine > and it had to be > transfered by ftp to a UNIX server. The codes worked fine > when I tested them on > my windows machine. Is it true that the data could get > corrupted while being > ftp'ed from Windows to Unix. I was told by the Unix people If you ftp them in binary mode instead of ascii mode yes that will screw it up. > that they couldn't > get the code to work at first because the codes were > developped in windows What do you mean by "didn't work". They failed completely, output not as expected, ... What modules did you use? Are those installed on the unix host? What errors are you getting? To the screen or a log of some kind? > environment. Codes are working now though. Just being curious. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Get pop3 message with Message-Id
On Mon, 25 Aug 2003 15:02:08 -0500, "Dan Muey" <[EMAIL PROTECTED]> wrote: > > > > Say for instance you have a pop3 account with 1000 messages > > in it. You > > > have a list of 10 Message-Id's from the header of ten of those > > > messages. > > > > > > You could log in, grab the header foreach message and if it has a > > > Message-Id that matches then do what you will with it. Log out; > > > > > > This will work but going through 1000 messages for ten messages is > > > quite over kill; > > > > > > Anyone know of a faster way/function/module that you could do > > > something like: > > > > > > use Mail::POP3Client; > > > my $pop = .; > > > > > > my $message = > > > > > $pop->HeadAndBody('<[EMAIL PROTECTED] > > > 38>'); > > > > > > Or grab the msgnum via Message-Id > > > > > > my $msgnum = > > > > > $pop->GrabNumViaMessageId('<[EMAIL PROTECTED] > > fuu.hdw6324rhfn238>'); > > > my $message = $pop->HeadAndBody($msgnum); > > > > > > Any ideas??? Or am I stuck iterating throught tons of messages and > > > checking them all for the proper Message-Id header? > > > > > > > I *believe* that the Mail::Box suite can do something very > > similar. I know there has been quite a bit of work done on it > > to make operations like this very speedy. Personally I > > haven't used this particular chunk of functionality from that > > distro, but I have used other parts and they worked well. > > http://perl.overmeer.net/mailbox/ > > Thanks! > It does have a find(),messageId(),and messageIds() now all I have to > do is figure out how to use log into a pop3 account with it and use those! > Sorry I forgot to include the "obligatory" Mail::Box has a *bit* of a learning curve as compared to most other mail handling modules and a performance/memory hit for small tasks, but honestly it is worth it once you get over the hump or have to do a lot of handling. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Perl Codes Written in Windows Env
> I have a perl script that I developped in a windows machine > and it had to be > transfered by ftp to a UNIX server. The codes worked fine > when I tested them on > my windows machine. Is it true that the data could get > corrupted while being > ftp'ed from Windows to Unix. I was told by the Unix people If you ftp them in binary mode instead of ascii mode yes that will screw it up. > that they couldn't > get the code to work at first because the codes were > developped in windows What do you mean by "didn't work". They failed completely, output not as expected, ... What modules did you use? Are those installed on the unix host? What errors are you getting? To the screen or a log of some kind? > environment. Codes are working now though. Just being curious. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Perl Codes Written in Windows Env
I have a perl script that I developped in a windows machine and it had to be transfered by ftp to a UNIX server. The codes worked fine when I tested them on my windows machine. Is it true that the data could get corrupted while being ftp'ed from Windows to Unix. I was told by the Unix people that they couldn't get the code to work at first because the codes were developped in windows environment. Codes are working now though. Just being curious. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pronunciation guide
Here I listen $_ is mother's heart, because only mother's heart accept anything. ;) But $ for me is a monetary value of any kind, not dolar specifically. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; "'Paul Archer'" <[EMAIL PROTECTED]> Sent: Monday, August 25, 2003 4:31 PM Subject: RE: pronunciation guide > > I thought it was only called 'string' in Applesoft... > > Glad to hear I'm not the only one. My co-workers think I'm crazy. > > > > |-+> > | | "Paul Kraus" | > | | <[EMAIL PROTECTED]| > | | .com>| > | || > | | 08/25/2003 09:02 | > | | AM | > | | Please respond to| > | | pkraus | > | || > |-+> > >--- ---| > | | > | To: "'Paul Archer'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] | > | cc: | > | Subject: RE: pronunciation guide | > >--- ---| > > > > > Not sure how to help you I do not that it is not very common to refer to > $ as dollar unless your talking about dollars. Generally when dealing > with computers it is a representation of the word string and is spoken > as such. > > String-underscore. > > -Original Message- > From: Paul Archer [mailto:[EMAIL PROTECTED] > Sent: Monday, August 25, 2003 8:08 AM > To: [EMAIL PROTECTED] > Subject: pronunciation guide > > > Does anyone know of a pronunciation guide for the special variables and > such in Perl? I came up empty on Google. I've been learning Perl by > reading and doing, but I haven't talked to anyone face-to-face, so I'm > not sure, for example, if $_ is spoken "dollar-underscore", or if people > typically say something else--like "<=>" is a "spaceship", or "#!" is a > "shebang". > > Paul > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > ** CONFIDENTIALITY NOTICE ** > NOTICE: This e-mail message and all attachments transmitted with it may > contain legally privileged and confidential information intended solely for > the use of the addressee. If the reader of this message is not the > intended recipient, you are hereby notified that any reading, > dissemination, distribution, copying, or other use of this message or its > attachments is strictly prohibited. If you have received this message in > error, please notify the sender immediately and delete this message from > your system. Thank you.. > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > Esta mensagem foi verificada pelo E-mail Protegido Terra. > Scan engine: VirusScan / Atualizado em 20/08/2003 / Versão: 1.3.13 > Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/ > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
linking (shortcuts in windows) using perl
Hi, I am looking for a solution to create links (similar to shortcuts in windows) of dirs present in D: drive to E: drive or something else. How do i achieve this using perl? please provide me some assistance as i am a beginner with perl. rgds thyag __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Get pop3 message with Message-Id
> > Say for instance you have a pop3 account with 1000 messages > in it. You > > have a list of 10 Message-Id's from the header of ten of those > > messages. > > > > You could log in, grab the header foreach message and if it has a > > Message-Id that matches then do what you will with it. Log out; > > > > This will work but going through 1000 messages for ten messages is > > quite over kill; > > > > Anyone know of a faster way/function/module that you could do > > something like: > > > > use Mail::POP3Client; > > my $pop = .; > > > > my $message = > > > $pop->HeadAndBody('<[EMAIL PROTECTED] > > 38>'); > > > > Or grab the msgnum via Message-Id > > > > my $msgnum = > > > $pop->GrabNumViaMessageId('<[EMAIL PROTECTED] > fuu.hdw6324rhfn238>'); > > my $message = $pop->HeadAndBody($msgnum); > > > > Any ideas??? Or am I stuck iterating throught tons of messages and > > checking them all for the proper Message-Id header? > > > > I *believe* that the Mail::Box suite can do something very > similar. I know there has been quite a bit of work done on it > to make operations like this very speedy. Personally I > haven't used this particular chunk of functionality from that > distro, but I have used other parts and they worked well. > http://perl.overmeer.net/mailbox/ Thanks! It does have a find(),messageId(),and messageIds() now all I have to do is figure out how to use log into a pop3 account with it and use those! Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pronunciation guide
I thought it was only called 'string' in Applesoft... Glad to hear I'm not the only one. My co-workers think I'm crazy. |-+> | | "Paul Kraus" | | | <[EMAIL PROTECTED]| | | .com>| | || | | 08/25/2003 09:02 | | | AM | | | Please respond to| | | pkraus | | || |-+> >--| | | | To: "'Paul Archer'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] | | cc: | | Subject: RE: pronunciation guide | >--| Not sure how to help you I do not that it is not very common to refer to $ as dollar unless your talking about dollars. Generally when dealing with computers it is a representation of the word string and is spoken as such. String-underscore. -Original Message- From: Paul Archer [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 8:08 AM To: [EMAIL PROTECTED] Subject: pronunciation guide Does anyone know of a pronunciation guide for the special variables and such in Perl? I came up empty on Google. I've been learning Perl by reading and doing, but I haven't talked to anyone face-to-face, so I'm not sure, for example, if $_ is spoken "dollar-underscore", or if people typically say something else--like "<=>" is a "spaceship", or "#!" is a "shebang". Paul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** CONFIDENTIALITY NOTICE ** NOTICE: This e-mail message and all attachments transmitted with it may contain legally privileged and confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message from your system. Thank you.. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
any file system in database with gnu gpl license ?
Yes .. I build a file system with firebird, perl and others. It's a free open source project. For more information visit the web project at http://sourceforge.net/projects/tlsystem I'm waiting yours comments. best regards -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Perl 5.6 Installation for Windows 2003 Server
Did AS release a different version for XP? If so, try that... -Original Message- From: Smith Jeff D [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 9:09 AM To: [EMAIL PROTECTED] Subject: Perl 5.6 Installation for Windows 2003 Server I've been looking for help on installing Perl 5.6 for Windows 2003. I downloaded Activestate's MSI executable but it gets hung up on the "Wrong OS" since Acitvestate provides a Windows 2000 but not a 2003 version. Has anyone else had this issue and worked around the standard installation from Activestate? I've posed this to the Activestate support desk too. Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Process Timestamp?
Jones, Jeremy wrote: I'm looking for a way to check a Processes age (how long it's been running). Is there a way to do this without installing extra modules? I know ps-ef does it, I was hoping for elegance over the hammer & chisel... Without installing extra modules you have to parse ps output or read /proc filesystem by yourself. If you want elegance then install Proc::ProcessTable module from CPAN. -zsdc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Get pop3 message with Message-Id
On Mon, 25 Aug 2003 13:15:26 -0500, "Dan Muey" <[EMAIL PROTECTED]> wrote: > Howdy group! > > Anyone familiar with logging into Pop3 mailbox with Perl know any ways yo grab a > message via it's Message-Id header? > > Say for instance you have a pop3 account with 1000 messages in it. > You have a list of 10 Message-Id's from the header of ten of those messages. > > You could log in, grab the header foreach message and if it has a Message-Id that > matches then do what you will with it. > Log out; > > This will work but going through 1000 messages for ten messages is quite over kill; > > Anyone know of a faster way/function/module that you could do something like: > > use Mail::POP3Client; > my $pop = .; > > my $message = $pop->HeadAndBody('<[EMAIL PROTECTED]>'); > > Or grab the msgnum via Message-Id > > my $msgnum = $pop->GrabNumViaMessageId('<[EMAIL PROTECTED]>'); > my $message = $pop->HeadAndBody($msgnum); > > Any ideas??? Or am I stuck iterating throught tons of messages and checking them all > for the proper Message-Id header? > I *believe* that the Mail::Box suite can do something very similar. I know there has been quite a bit of work done on it to make operations like this very speedy. Personally I haven't used this particular chunk of functionality from that distro, but I have used other parts and they worked well. http://perl.overmeer.net/mailbox/ http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Perl & XS
Ok, Found the issue, it appears the Sybase renamed a lib on Linux from libtcl ( which conflicts with a system library ) to libsybtcl. Once I linked with the right libraries everything seems ok. There is still one issue and that is that I still have to use LD_PRELOAD to get the libraries into memory. For some reason Perl on Linux does not want to scan my LD_LIBRARY_PATH to find the shared libs needed by Sybase. Any clues ? Throwing breadcrumbs is acceptable. Chuck [EMAIL PROTECTED] wrote: Help! I have written a perl module that uses XS to reach out to a password database and retrieve a password for eventual use in DBI. My problem is Linux related. I have compiled and tested this code on HP and Sun and it works just fine there. However on my RedHat AS2.1 box, the code refuses to function correctly. My first errors were related to getting perl to find Sybase libs. One of my colleagues suggested that I use LD_PRELOAD to identify the libraries that are required. This resolved the issues with the undefined symbol ct_cmd_alloc. Now my perl test code appears to load the module correctly, however, when it goes to execute the succeeding tests, they are being skipped as the first test which "use's" the module returns t/1 ok 1/3 t/1.dubious Test returned status 0 (wstat 139, 0x8b) DIED. FAILED tests 2-3 I think its still having issues with correctly loading the module, but I am unsure of where to go from here. WTF does wstat = 139 mean ? Any suggestions would be appreciated. BTW, the module cores after the tests are finished. Chuck Fox Principal Database Administrator America Online, INC. Additional Info: Linux AS 2.1 2.4.9-e.12smp #1 SMP Sybase 12.5 Perl 5.8.0 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Get pop3 message with Message-Id
Howdy group! Anyone familiar with logging into Pop3 mailbox with Perl know any ways yo grab a message via it's Message-Id header? Say for instance you have a pop3 account with 1000 messages in it. You have a list of 10 Message-Id's from the header of ten of those messages. You could log in, grab the header foreach message and if it has a Message-Id that matches then do what you will with it. Log out; This will work but going through 1000 messages for ten messages is quite over kill; Anyone know of a faster way/function/module that you could do something like: use Mail::POP3Client; my $pop = .; my $message = $pop->HeadAndBody('<[EMAIL PROTECTED]>'); Or grab the msgnum via Message-Id my $msgnum = $pop->GrabNumViaMessageId('<[EMAIL PROTECTED]>'); my $message = $pop->HeadAndBody($msgnum); Any ideas??? Or am I stuck iterating throught tons of messages and checking them all for the proper Message-Id header? TIA Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Perl 5.8 Install on OS X
Help. Today I went to CPAN to download and install the SOAP::Lite module using the command perl -MCPAN -e 'install SOAP::Lite' The module did seem to install but in the process, it seemed that CPAN decided to also install perl v5.8 for me without asking me to confirm. I have perl, v5.6.0 and I still have it after a lng install process of perl, v5.8. What happened? Is 5.8 waiting on my system to be started or does this install fail. This has happened before. I want to grab another module but would like to figure this out before I venture back to CPAN. Thanks. Sorry for what I'm sure is a FAQ but I can't find the answer. -- Peter Fleck Webmaster | University of Minnesota Cancer Center Dinnaken Office Bldg. 925 Delaware St. SE Minneapolis, MN 55414 612-625-8668 | [EMAIL PROTECTED] | www.cancer.umn.edu Campus Mail: MMC 806 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
August Bank Holiday Weekend
All: For the majority of this group who are non-British, this is just a reminder that most of Britain will not be working today ( 25-Aug-2003 ) or for the rest of the week. How this applies to the rest of Europe I don't know. Perhaps others who are not working today can help ;-) /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Perl 5.6 Installation for Windows 2003 Server
I've been looking for help on installing Perl 5.6 for Windows 2003. I downloaded Activestate's MSI executable but it gets hung up on the "Wrong OS" since Acitvestate provides a Windows 2000 but not a 2003 version. Has anyone else had this issue and worked around the standard installation from Activestate? I've posed this to the Activestate support desk too. Thanks
RE: multiple regex in if() staetment
> On Tue, Aug 19, 2003 at 05:54:42PM -0500, Dan Muey wrote: > > Howdy all: > > > > I'm trying to figure out the best way to test a string > agains a list > > of regexs like so: > > > > my @regex = qw(qr(joe$) qr(^mama) qr([abc])); > > As was pointed out already, don't use the qw(). > > Here are some interesting benchmarks. The 'docs_in_col' file > was about 16k, and the strings I was testing for were right > at the bottom. > > #!/usr/bin/perl > > use warnings; > use strict; > use IO::File; > use Benchmark; > > my $fh = new IO::File("docs_in_col") or die $!; > my $str; > { > local $/; > $str = <$fh>; > } > > my $alt_re = qr(Zucker|Zuckerman|Zurrow); > my @grep_re = (qr(Zucker), qr(Zuckerman), qr(Zurrow)); > > timethese(5000, > { > match_alts_scalar => \&match_alts_scalar, > match_alts_array => \&match_alts_array, > grep_mults => \&grep_mults, > } >); > > ### > > sub match_alts_scalar { > my $found = ($str =~ /$alt_re/); > return $found; > } > > ### > > sub grep_mults { > my $found = grep { $str =~ /$_/ } @grep_re; > return $found; > } > > > And here are the results: > > Benchmark: timing 5000 iterations of grep_mults, match_alts_scalar... > grep_mults: 1 wallclock secs ( 0.54 usr + 0.00 sys = 0.54 > CPU) @ 9275.36/s (n=5000) > match_alts_scalar: 40 wallclock secs (39.20 usr + 0.02 sys = > 39.22 CPU) @ 127.49/s (n=5000) > > > This should only be considered a first approximation, since > there are various things I'm not controlling for (all my > strings were at the end, they were fixed strings, etc). > > Still, I would use the grep version. Thanks for the effort there very handy! > > > --Dks > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pronunciation guide
> "Arthaey" == Arthaey Angosii <[EMAIL PROTECTED]> writes: Arthaey> I have heard <=> as "spaceship" and <> as the "diamond" operator. Larry's daughter Heidi came up with "diamond". And I'm the culprit responsible for "spaceship". -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: fork & wait
T.S.Ravi Shankar wrote: > Dear all : > > I see these lines in a perl program : > > $pif = fork; > if($pid == 0) { > exec("hpxy -s xxx.abc"); > }else{ > $pid1=wait; > } > > I could understand that the fork is needed here to get into the child > process "hpxy" !! What is the need for the "wait" here ?? When will > the "else" loop be entered ?? After fork() there are two processes, parent and child. fork returns 0 to the child, and the child's pid to the parent. So the "if" part is handling the child, while the "else" part is handling the parent. Basically, the child is exec()'ing a new program, while the parent is calling wait(), which waits for the child to terminate. The lines above are essentially equivalent to: system("hpxy -s xxx.abc"); Unless there's something else going on in the program that we're not seeing, system() should be used instead of the code above, IMO. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pronunciation guide
>Does anyone know of a pronunciation guide for the special variables and such >in Perl? I came up empty on Google. I've been learning Perl by reading and >doing, but I haven't talked to anyone face-to-face, so I'm not sure, for >example, if $_ is spoken "dollar-underscore", or if people typically say >something else--like "<=>" is a "spaceship", or "#!" is a "shebang". My friend and I have been learning Perl in relative isolation from any other experienced Perl programmers, so we've developed our own names for these variables. I have no idea what the rest of the community uses, but we have adopted $_ as "Dalton" -- a (mis)contraction of "DOLlar UNderscore". :) We also pronounce $ in from of normal variables as "scalar", and @ as "array" (or less frequently "list", if we feel like being more accurate). I have heard <=> as "spaceship" and <> as the "diamond" operator. But I agree with you, it would be interesting to have some global list of various ways Perl's special variables are called. :) -- AA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
fork & wait
Dear all : I see these lines in a perl program : $pif = fork; if($pid == 0) { exec("hpxy -s xxx.abc"); }else{ $pid1=wait; } I could understand that the fork is needed here to get into the child process "hpxy" !! What is the need for the "wait" here ?? When will the "else" loop be entered ?? Thanks, Ravi -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pronunciation guide
Yep. One of our remaining distribution packages is still using business basic. Sums it up :) Paul -Original Message- From: Paul Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 10:54 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: pronunciation guide Paul Kraus said: > Wow. I find that unusual in my 10 years of computer use/programming > ... I have always referred to $ and heard it referred to as "string". > > Not that it matters but I find that definitely unusual :) Do you have a background in BASIC? I think that in the UK at least it is (was ?) common to refer to the $ in A$, for example, as "string" since that is what it was, and it obviously had nothing to do with dollars. But as far as Perl is concerned it is "dollar", and I am not aware of any exceptions. Now, as to whether $! is dollar-bang, dollar-pling, dollar-exclamation-mark or anything else is not so easy. You might find this link interesting: http://www.eeng.brad.ac.uk/help/.faq/.unix/.pronun.html But people, # is not a pound! ;-) > -Original Message- > From: Peter Scott [mailto:[EMAIL PROTECTED] > Sent: Monday, August 25, 2003 10:20 AM > To: [EMAIL PROTECTED] > Subject: RE: pronunciation guide > > > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Paul Kraus) writes: >>Not sure how to help you I do not that it is not very common to refer >>to $ as dollar unless your talking about dollars. Generally when >>dealing with computers it is a representation of the word string and >>is > >>spoken as such. >> >>String-underscore. > > I've never heard that. I've been to dozens of meetings and > conferences, heard thousands of people talking about Perl, and never > before have I heard $_ referred to as anything other than "dollar > underscore" or occasionally "dollar underbar". > > Strings are a small subset of possible values for scalars. If $ were > mnemonic for anything, it would be "scalar", not "string". -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pronunciation guide
Paul Kraus said: > Wow. I find that unusual in my 10 years of computer use/programming ... > I have always referred to $ and heard it referred to as "string". > > Not that it matters but I find that definitely unusual :) Do you have a background in BASIC? I think that in the UK at least it is (was ?) common to refer to the $ in A$, for example, as "string" since that is what it was, and it obviously had nothing to do with dollars. But as far as Perl is concerned it is "dollar", and I am not aware of any exceptions. Now, as to whether $! is dollar-bang, dollar-pling, dollar-exclamation-mark or anything else is not so easy. You might find this link interesting: http://www.eeng.brad.ac.uk/help/.faq/.unix/.pronun.html But people, # is not a pound! ;-) > -Original Message- > From: Peter Scott [mailto:[EMAIL PROTECTED] > Sent: Monday, August 25, 2003 10:20 AM > To: [EMAIL PROTECTED] > Subject: RE: pronunciation guide > > > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Paul Kraus) writes: >>Not sure how to help you I do not that it is not very common to refer >>to $ as dollar unless your talking about dollars. Generally when >>dealing with computers it is a representation of the word string and is > >>spoken as such. >> >>String-underscore. > > I've never heard that. I've been to dozens of meetings and conferences, > heard thousands of people talking about Perl, and never before have I > heard $_ referred to as anything other than "dollar underscore" or > occasionally "dollar underbar". > > Strings are a small subset of possible values for scalars. If $ were > mnemonic for anything, it would be "scalar", not "string". -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pronunciation guide
From: [EMAIL PROTECTED] (Peter Scott) > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Paul Kraus) writes: > >Not sure how to help you I do not that it is not very common to refer > >to $ as dollar unless your talking about dollars. Generally when > >dealing with computers it is a representation of the word string and > >is spoken as such. > > > >String-underscore. > > I've never heard that. I've been to dozens of meetings and > conferences, heard thousands of people talking about Perl, and never > before have I heard $_ referred to as anything other than "dollar > underscore" or occasionally "dollar underbar". > > Strings are a small subset of possible values for scalars. If $ were > mnemonic for anything, it would be "scalar", not "string". I believe the "string" comes from some versions of Basic (and maybe also Fortran) that used the $ to distinguish string versus numerical variables. If I remember right "Var$" was a string variable and "Var" was a numerical variable. And we used to read the $ as "string". Though ... at those times we did not know any english so we read all keywords quite strange ;-) Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pronunciation guide
On Monday, August 25, 2003, at 10:28 AM, Paul Kraus wrote: Wow. I find that unusual in my 10 years of computer use/programming ... I have always referred to $ and heard it referred to as "string". Not that it matters but I find that definitely unusual :) I've been to a number of conferences as well and never heard anyone refer to $anything as anything other than 'dollar anything'. George -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pronunciation guide
Wow. I find that unusual in my 10 years of computer use/programming ... I have always referred to $ and heard it referred to as "string". Not that it matters but I find that definitely unusual :) Paul -Original Message- From: Peter Scott [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 10:20 AM To: [EMAIL PROTECTED] Subject: RE: pronunciation guide In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Paul Kraus) writes: >Not sure how to help you I do not that it is not very common to refer >to $ as dollar unless your talking about dollars. Generally when >dealing with computers it is a representation of the word string and is >spoken as such. > >String-underscore. I've never heard that. I've been to dozens of meetings and conferences, heard thousands of people talking about Perl, and never before have I heard $_ referred to as anything other than "dollar underscore" or occasionally "dollar underbar". Strings are a small subset of possible values for scalars. If $ were mnemonic for anything, it would be "scalar", not "string". >-Original Message- >From: Paul Archer [mailto:[EMAIL PROTECTED] >Sent: Monday, August 25, 2003 8:08 AM >To: [EMAIL PROTECTED] >Subject: pronunciation guide > > >Does anyone know of a pronunciation guide for the special variables and >such in Perl? I came up empty on Google. I've been learning Perl by >reading and doing, but I haven't talked to anyone face-to-face, so I'm >not sure, for example, if $_ is spoken "dollar-underscore", or if >people typically say something else--like "<=>" is a "spaceship", or >"#!" is a "shebang". -- Peter Scott http://www.perldebugged.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pronunciation guide
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Paul Kraus) writes: >Not sure how to help you I do not that it is not very common to refer to >$ as dollar unless your talking about dollars. Generally when dealing >with computers it is a representation of the word string and is spoken >as such. > >String-underscore. I've never heard that. I've been to dozens of meetings and conferences, heard thousands of people talking about Perl, and never before have I heard $_ referred to as anything other than "dollar underscore" or occasionally "dollar underbar". Strings are a small subset of possible values for scalars. If $ were mnemonic for anything, it would be "scalar", not "string". >-Original Message- >From: Paul Archer [mailto:[EMAIL PROTECTED] >Sent: Monday, August 25, 2003 8:08 AM >To: [EMAIL PROTECTED] >Subject: pronunciation guide > > >Does anyone know of a pronunciation guide for the special variables and >such in Perl? I came up empty on Google. I've been learning Perl by >reading and doing, but I haven't talked to anyone face-to-face, so I'm >not sure, for example, if $_ is spoken "dollar-underscore", or if people >typically say something else--like "<=>" is a "spaceship", or "#!" is a >"shebang". -- Peter Scott http://www.perldebugged.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parse a big HTML text
> From: Pablo Fischer <[EMAIL PROTECTED]> > > I have in $myvar a BIG HTML Text. I need to change some values to > > others. > > > > For example, in one part I have > > > > Come and discover the OpenSource ###1### > > > > I need to change all the ###1### values for $name, so It will be: > > > > Come and discover the OpenSource pablo > > > > if the content of $name its "pablo". > > > > I have tried with > > > > $myvar =~ s/\###1###/$name; > > I believe the actuall code looks like this, right? > > $myvar =~ s/\###1###/$name/; > > You are missing a /g at the end to make sure you replace ALL > occurances even if there are several on one line. And you do not need > the backslash there: > > $myvar =~ s/###1###/$name/g; > This way will do it but have you looked at The Template Toolkit? Take a look at it on cpan. Very cool of rthis sort of thing. HTH Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pronunciation guide
Not sure how to help you I do not that it is not very common to refer to $ as dollar unless your talking about dollars. Generally when dealing with computers it is a representation of the word string and is spoken as such. String-underscore. -Original Message- From: Paul Archer [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 8:08 AM To: [EMAIL PROTECTED] Subject: pronunciation guide Does anyone know of a pronunciation guide for the special variables and such in Perl? I came up empty on Google. I've been learning Perl by reading and doing, but I haven't talked to anyone face-to-face, so I'm not sure, for example, if $_ is spoken "dollar-underscore", or if people typically say something else--like "<=>" is a "spaceship", or "#!" is a "shebang". Paul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
pronunciation guide
Does anyone know of a pronunciation guide for the special variables and such in Perl? I came up empty on Google. I've been learning Perl by reading and doing, but I haven't talked to anyone face-to-face, so I'm not sure, for example, if $_ is spoken "dollar-underscore", or if people typically say something else--like "<=>" is a "spaceship", or "#!" is a "shebang". Paul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parse a big HTML text
From: Pablo Fischer <[EMAIL PROTECTED]> > I have in $myvar a BIG HTML Text. I need to change some values to > others. > > For example, in one part I have > > Come and discover the OpenSource ###1### > > I need to change all the ###1### values for $name, so It will be: > > Come and discover the OpenSource pablo > > if the content of $name its "pablo". > > I have tried with > > $myvar =~ s/\###1###/$name; I believe the actuall code looks like this, right? $myvar =~ s/\###1###/$name/; You are missing a /g at the end to make sure you replace ALL occurances even if there are several on one line. And you do not need the backslash there: $myvar =~ s/###1###/$name/g; > Does HTML::Parser will help me? I don't think so. You are not really parsing HTML, you are just replacing some patterns. And the fact that in this particual case you have them in some HTML file is irrelevant. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Process Timestamp?
Hello World! I'm looking for a way to check a Processes age (how long it's been running). Is there a way to do this without installing extra modules? I know ps-ef does it, I was hoping for elegance over the hammer & chisel... (Perl 5.6 is installed) Thanks! Jeremy F. Jones -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to download a .pdf file from a website
John W. Krahn wrote: > > Perlwannabe wrote: > > > > There is a .pdf file on a website that I would like to download on a daily > > basis. The site puts up a new .pdf file everyday and I would like to > > write a simple script to download the file to my computer. > > > > The URL basically adds the name of the file with the date, i.e. > > > > http://www.samplesite.com/files/August23.pdf > > > > all I want to do is get the file. Obviously the .pdf will change to > > August24.pdf on the 24th. I looked all over and the stuff available looks > > way to sophisticated for what I want (i.e. mywebget). I just want a > > simple script to download the file. > > > > Seems easy enough, but tough to find information on how to do it. > > This should work (untested): > > #!/usr/bin/perl > use warnings; > use strict; > use POSIX 'strftime'; > use LWP::Simple; > > my $url = 'http://www.samplesite.com/files'; > my $file = strftime '%B%d.pdf', localtime; > > getstore( "$url/$file", $file ); > > __END__ Changing the last line to this my $rc = getstore( "$url/$file", $file ); print status_message($rc), "\n"; will tell you whether the transfer succeeded or, if not, what the returned error code meant. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file updation
From: "mark sony" <[EMAIL PROTECTED]> > I have one file (say about 6000 lines) data divided into four > columns,say filename,owner,version etc.Now there would be two more > columns which shall be updated by multiple users according to the need > .Whats the best possible way of going forward? There would be about 30 > users updating the empty columns ? Have a look at DBD::CSV and DBD::AnyData Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reading writing to INI files
From: Saadat Saeed <[EMAIL PROTECTED]> > Are there any modules available that can read/write to > INI files. I think that apart from XML and templates there is no other task for that you'd get more modules thant reading and writing INI files. Config::IniFiles Config::IniHash Config::Tiny AnyData::Format::Ini Config::Abstract::Ini Win32::AdminMisc (I believe) Win32::FileOp ... Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: file updation
Hi Thanx for the reply but now I cant use database for this program . I have to do with modifying files in some way or the other . Please give me some other pointers . Thanx Mark On Mon, 25 Aug 2003 zsdc wrote : mark sony wrote: I have one file (say about 6000 lines) data divided into four columns,say filename,owner,version etc.Now there would be two more columns which shall be updated by multiple users according to the need .Whats the best possible way of going forward? There would be about 30 users updating the empty columns ? Few weeks ago Kake Pugh wrote an article on Perl.com entitled How to Avoid Writing Code: http://www.perl.com/pub/a/2003/07/15/nocode.html It's about using Class::DBI and the Template Toolkit. It might be exactly what you are looking for. -zsdc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Art meets Army ; Swapna Weds Capt. Rajsekhar. Rediff Matchmaker strikes another interesting match !! Visit http://matchmaker.rediff.com?2 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
file updation
Hi All I need some guidance on the following :- I have one file (say about 6000 lines) data divided into four columns,say filename,owner,version etc.Now there would be two more columns which shall be updated by multiple users according to the need .Whats the best possible way of going forward? There would be about 30 users updating the empty columns ? Thanx Mark ___ Art meets Army ; Swapna Weds Capt. Rajsekhar. Rediff Matchmaker strikes another interesting match !! Visit http://matchmaker.rediff.com?2 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Temp variable
John W. Krahn wrote: my ( $x, $y ) = ( "two", "three" ); print "\$x = $x \$y = $y"; $x ^= $y; $y ^= $x; $x ^= $y; print "\$x = $x \$y = $y"; Cool. I wouldn't have thought such a xoring would work on strings with different length. Well, maybe I would, but I certainly haven't. Very cool, indeed. -zsdc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: update perl
Bulba007 wrote: I run CPAN. How upgrade all installed modules in my system? From the CPAN module docs: # install everything that is outdated on my disk: perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)' See: man CPAN -zsdc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to download a .pdf file from a website
Perlwannabe wrote: > > There is a .pdf file on a website that I would like to download on a daily > basis. The site puts up a new .pdf file everyday and I would like to > write a simple script to download the file to my computer. > > The URL basically adds the name of the file with the date, i.e. > > http://www.samplesite.com/files/August23.pdf > > all I want to do is get the file. Obviously the .pdf will change to > August24.pdf on the 24th. I looked all over and the stuff available looks > way to sophisticated for what I want (i.e. mywebget). I just want a > simple script to download the file. > > Seems easy enough, but tough to find information on how to do it. This should work (untested): #!/usr/bin/perl use warnings; use strict; use POSIX 'strftime'; use LWP::Simple; my $url = 'http://www.samplesite.com/files'; my $file = strftime '%B%d.pdf', localtime; getstore( "$url/$file", $file ); __END__ John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to download a .pdf file from a website
There is a .pdf file on a website that I would like to download on a daily basis. The site puts up a new .pdf file everyday and I would like to write a simple script to download the file to my computer. The URL basically adds the name of the file with the date, i.e. http://www.samplesite.com/files/August23.pdf all I want to do is get the file. Obviously the .pdf will change to August24.pdf on the 24th. I looked all over and the stuff available looks way to sophisticated for what I want (i.e. mywebget). I just want a simple script to download the file. Seems easy enough, but tough to find information on how to do it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: rearrange text
Mike Robeson wrote: > > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John W. Krahn) > wrote: > > > Mike Robeson wrote: > > > > > > I do not know what happend but the text didn't get formatted correctly > > > on the list. But this is how the out put should really have been: > > > > > > a g a t a g a t c g c a t c g a - - - - - -dog > > > a c g c t t c g a t a c g c t a g c t t a -cat > > > a g a t a t a c g g g t t - - - - - - - - -mouse > > > > > > That is, I want the edited sequence data and the name on the same line. > > > > #!/usr/bin/perl > > use warnings; > > use strict; > > > > my $len = 30; > > my $name; > > while ( ) { > > chomp; > > unless ( s/^\s*>(.+)// ) { > > $name = $1; > > my @char = ( split( // ), ( '-' ) x ( $len - length ) ); > > print "@char$name\n"; > > } > > } > > > > __DATA__ > > >dog > > agatagatcgcatcga > > >cat > > acgcttcgatacgctagctta > > >mouse > > agatatacgggt > > Thanks for the help!! I new it had to be simple... but I just didn't see > it! I just need to add some more code to it but I think I can take it > from here. You can make that a bit more robust. :-) #!/usr/bin/perl use warnings; use strict; my $len = 30; while ( ) { unless ( /^\s*$/ or s/^\s*>(\S+)// ) { my $name = $1; my @char = ( /[acgt]/g, ( '-' ) x $len )[ 0 .. $len - 1 ]; print "@char$name\n"; } } __DATA__ >dog agatagatcgcatcga >cat acgcttcgatacgctagctta >mouse agatatacgggt John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: rearrange text
John, Thanks for the help!! I new it had to be simple... but I just didn't see it! I just need to add some more code to it but I think I can take it from here. Thanks again! -Mike In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John W. Krahn) wrote: > Mike Robeson wrote: > > > > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John W. Krahn) > > wrote: > > > > > > According to your data this should work: > > > > > > #!/usr/bin/perl > > > use warnings; > > > use strict; > > > > > > my $len = 30; # pad out to this length > > > while ( ) { > > > unless ( s/^\s*>// ) { > > > chomp; > > > my @char = ( split( // ), ( '-' ) x ( $len - length ) ); > > > $_ = "@char\n"; > > > } > > > print; > > > } > > > > > > __DATA__ > > > >dog > > > agatagatcgcatcga > > > >cat > > > acgcttcgatacgctagctta > > > >mouse > > > agatatacgggt > > > > I do not know what happend but the text didn't get formatted correctly > > on the list. But this is how the out put should really have been: > > > > a g a t a g a t c g c a t c g a - - - - - -dog > > a c g c t t c g a t a c g c t a g c t t a -cat > > a g a t a t a c g g g t t - - - - - - - - -mouse > > > > That is, I want the edited sequence data and the name on the same line. > > #!/usr/bin/perl > use warnings; > use strict; > > my $len = 30; > my $name; > while ( ) { > chomp; > unless ( s/^\s*>(.+)// ) { > $name = $1; > my @char = ( split( // ), ( '-' ) x ( $len - length ) ); > print "@char$name\n"; > } > } > > __DATA__ > >dog > agatagatcgcatcga > >cat > acgcttcgatacgctagctta > >mouse > agatatacgggt > > > > John -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [solved again] Parse a big HTML text
Pablo Fischer wrote: I cant believe it.. Every message that I send I get an obvious answer by my self. Thanks and sorry There's no reason to be sorry. People reading your answers to your questions can only learn, so in my opinion it's actually much better to ask and then publicly answer your own questions than to keep it all to yourself. It's kind of like writing a column about real world trouble shooting and learning Perl with real examples. -zsdc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: update perl
Bulba007 wrote: I run CPAN. How upgrade all installed modules in my system? There are a couple of examples of how to do this programmatically in the documentation for the CPAN module itself. perldoc CPAN http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [solved again] Parse a big HTML text
I cant believe it.. Every message that I send I get an obvious answer by my self. Thanks and sorry I need to $var =~ s/$s1/$s2/g The cheat its in the 'g'. Thanks! El día Sunday 24 August 2003 7:44 a Pablo Fischer mandó el siguiente correo: > Hi! > > I have in $myvar a BIG HTML Text. I need to change some values to others. > > For example, in one part I have > > Come and discover the OpenSource ###1### > > I need to change all the ###1### values for $name, so It will be: > > Come and discover the OpenSource pablo > > if the content of $name its "pablo". > > I have tried with > > $myvar =~ s/\###1###/$name; > > But no good results, some ###1### works and others no. > > Does HTML::Parser will help me? > > Thanks! > -- > Pablo Fischer Sandoval ([EMAIL PROTECTED]) > http://www.pablo.com.mx > http://www.debianmexico.org > GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C > Firma URL: http://www.pablo.com.mx/firmagpg.txt -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: http://www.pablo.com.mx/firmagpg.txt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Parse a big HTML text
Hi! I have in $myvar a BIG HTML Text. I need to change some values to others. For example, in one part I have Come and discover the OpenSource ###1### I need to change all the ###1### values for $name, so It will be: Come and discover the OpenSource pablo if the content of $name its "pablo". I have tried with $myvar =~ s/\###1###/$name; But no good results, some ###1### works and others no. Does HTML::Parser will help me? Thanks! -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: http://www.pablo.com.mx/firmagpg.txt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: rearrange text
Mike Robeson wrote: > > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John W. Krahn) > wrote: > > > > According to your data this should work: > > > > #!/usr/bin/perl > > use warnings; > > use strict; > > > > my $len = 30; # pad out to this length > > while ( ) { > > unless ( s/^\s*>// ) { > > chomp; > > my @char = ( split( // ), ( '-' ) x ( $len - length ) ); > > $_ = "@char\n"; > > } > > print; > > } > > > > __DATA__ > > >dog > > agatagatcgcatcga > > >cat > > acgcttcgatacgctagctta > > >mouse > > agatatacgggt > > I do not know what happend but the text didn't get formatted correctly > on the list. But this is how the out put should really have been: > > a g a t a g a t c g c a t c g a - - - - - -dog > a c g c t t c g a t a c g c t a g c t t a -cat > a g a t a t a c g g g t t - - - - - - - - -mouse > > That is, I want the edited sequence data and the name on the same line. #!/usr/bin/perl use warnings; use strict; my $len = 30; my $name; while ( ) { chomp; unless ( s/^\s*>(.+)// ) { $name = $1; my @char = ( split( // ), ( '-' ) x ( $len - length ) ); print "@char$name\n"; } } __DATA__ >dog agatagatcgcatcga >cat acgcttcgatacgctagctta >mouse agatatacgggt John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: rearrange text
Mike Robeson wrote: I do not know what happend but the text didn't get formatted correctly on the list. But this is how the out put should really have been: a g a t a g a t c g c a t c g a - - - - - -dog a c g c t t c g a t a c g c t a g c t t a -cat a g a t a t a c g g g t t - - - - - - - - -mouse That is, I want the edited sequence data and the name on the same line. I'd hate to mess with your DNA (but just in case -- I, for one, welcome our new super dog-cat-mouse mutant overlords) but I'll post two links you may find interesting (if you don't already know them, that is). First, you might take a look at the bioperl project: http://bioperl.org/ There's a mailing list you may find very useful, bioperl-l at bioperl.org: http://www.bioperl.org/MailList.shtml There's also a book, Beginning Perl for Bioinformatics written by James Tisdall: http://www.oreilly.com/catalog/begperlbio/ I wish you good luck with your creations. -zsdc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]