Re: MIME coding & flags for sending a .csv or Excel file (Question)

2004-07-14 Thread John W . Krahn
On Tuesday 13 July 2004 07:20, jason corbett wrote: > > Thanks John. This was my first PERL program that I wrote and I wasn't > sure when to use the my vs the our, but your points are well > respected. I need more practice to understand how the > functions/script work so that I can condense the pro

how to extract digit from a line in Perl

2004-07-14 Thread Franklin
Hello:   I want to extract the digit from a line of text. For exmple, for a text line: TSC2101Net, how can I write a script to extract 2101 and print it?   Thank you very much in advance!   Bestwishes Franklin       IncrediMail - Emai

Re: how to extract digit from a line in Perl

2004-07-14 Thread David Dorward
On 14 Jul 2004, at 11:00, Franklin wrote: I want to extract the digit from a line of text. For exmple, for a text line: TSC2101Net, how can I write a script to extract 2101 and print it? There are number of techniques that spring to mind, the obvious being regular expressions and substring. The

RE: how to extract digit from a line in Perl

2004-07-14 Thread NYIMI Jose (BMB)
Title: Message   -Original Message-From: Franklin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 12:01 PMTo: [EMAIL PROTECTED]Subject: how to extract digit from a line in Perl Hello:   I want to extract the digit from a line

Re: how to extract digit from a line in Perl

2004-07-14 Thread iko
Franklin wrote: > Hello: > I want to extract the digit from a line of text. For exmple, for a > text line: TSC2101Net, how can I write a script to extract 2101 and > print it? > Thank you very much in advance! > Bestwishes > Franklin > > > > >

RE: 2 Socket questions

2004-07-14 Thread Bob Showalter
Kelvin Wu wrote: > hello, > > > 1, how to use http 1.1 via IO::Socket? Create a tcp connection to the server using IO::Socket->new and send the HTTP request. Read the response and handle it appropriately. Better yet, use a higher-level module like LWP::Simple or LWP::UserAgent for this. > > 2,

RE: how to extract digit from a line in Perl

2004-07-14 Thread Bob Showalter
Franklin wrote: > Hello: > > I want to extract the digit from a line of text. For exmple, for a > text line: TSC2101Net, how can I write a script to extract 2101 and > print it? Use a regex to capture a series of digits: $_ = 'TSC2101Net'; my ($num) = /(\d+)/; print "Found $num\n" if def

Data File getting set to an empty file

2004-07-14 Thread Nigel Peck
Hi all, I have a (possible) problem with a script that records the number of page views for various pages on a site (full script below). Every so often (60 days or more) the data file (data.xml) loses all it's data and is still there but empty. Any suggestions greatly appreciated. Cheers, Nigel

Re: perl POE

2004-07-14 Thread Wiggins d Anconia
> > Ricardo SIGNES wrote: > > >* Anish Mehta <[EMAIL PROTECTED]> [2004-07-07T04:49:30] > > > > > >>Does anyone knows about some good links on PERL POE, how it allows > >> > >> > >Perl > > > > > >>code to make asynchronous, non-blocking I/O calls and handle those I/O > >>calls on the basis

Extracting headers of a Table in Perl.

2004-07-14 Thread jason corbett
I want to query a database and get data, but the headers don't come back. Is there a way that I can extract the headers of a table using Perl? Would it be easier to create a format, or should this be done in my SQL script? I don't have 'write' authority to the script. I just call it or read it a

Re: Reading a variable file name

2004-07-14 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Lee, Hello, A couple of questions: Ok, but please post to the list so everyone can share :) 1. I get an error on the use File::Slurp line. I have been looking in the "Camel" book and can't seem to find much. Is this a module that I need to download. Yes, perl -MCPAN -

Getopt::Std vs. Getopt::Long

2004-07-14 Thread perl.org
I have been using Getopt::Std for some time and I'm pretty happy with it. I've been reading about Getopt::Long and it seems to support everything in Getopt::Std and has some nice conveniences. Does anyone have experience converting scripts (or just development process) from Std to Long? Does any

Re: $^T inconsistant?

2004-07-14 Thread perl.org
We can all breath a sigh of relief now that I believe I've identified this as my bug. I would say the true root cause is that Perl doesn't support prototyping properly and named parameters at all though... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

Re: Getopt::Std vs. Getopt::Long

2004-07-14 Thread Wiggins d Anconia
> I have been using Getopt::Std for some time and I'm pretty happy with it. > I've been reading about Getopt::Long and it seems to support everything in > Getopt::Std and has some nice conveniences. Does anyone have experience > converting scripts (or just development process) from Std to Long?

Re: $^T inconsistant?

2004-07-14 Thread Wiggins d Anconia
> We can all breath a sigh of relief now that I believe I've identified this as > my bug. I would say the true root cause is that Perl doesn't support > prototyping properly and named parameters at all though... > properly, huh? and huh? http://danconia.org -- To unsubscribe, e-mail: [EMAIL

Re: $^T inconsistant?

2004-07-14 Thread perl.org
On Wed, 14 Jul 2004 11:05:45 -0600, Wiggins d Anconia wrote > > We can all breath a sigh of relief now that I believe I've identified > this as > > my bug. I would say the true root cause is that Perl doesn't support > > prototyping properly and named parameters at all though... > > > > properly

RE: $^T inconsistant?

2004-07-14 Thread Bob Showalter
perl.org wrote: > We can all breath a sigh of relief now that I believe I've identified > this as my bug. I would say the true root cause is that Perl doesn't > support prototyping properly and named parameters at all though... I second the "huh?" How did prototyping relate to the trouble with $

RE: $^T inconsistant?

2004-07-14 Thread perl.org
On Wed, 14 Jul 2004 13:26:36 -0400, Bob Showalter wrote > > I second the "huh?" > > How did prototyping relate to the trouble with $^T? > > How do you define "support prototyping properly?" Basically because of my implementation of named parameters. I was passing -value instead of -seed and th

Help a newbie to pick best version of Linux for Perl and perl/TK.

2004-07-14 Thread Marco Perl
Hi, Could you tell me what version of Linux is the most stable and with most lib modules to do pearl and perl/TK? I really appreciate your experience. Marco. - Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers!

RE: $^T inconsistant?

2004-07-14 Thread Bob Showalter
perl.org wrote: > On Wed, 14 Jul 2004 13:26:36 -0400, Bob Showalter wrote > > > > I second the "huh?" > > > > How did prototyping relate to the trouble with $^T? > > > > How do you define "support prototyping properly?" > > Basically because of my implementation of named parameters. I was > pa

Re: Help a newbie to pick best version of Linux for Perl and perl/TK.

2004-07-14 Thread Andrew Gaffney
Marco Perl wrote: Hi, Could you tell me what version of Linux is the most stable and with most lib modules to do pearl and perl/TK? I really appreciate your experience. Marco. What exactly are you talking about? Almost all Linux distributions are "stable" and come with Perl. Usually, the version

RE: Help a newbie to pick best version of Linux for Perl and perl /TK.

2004-07-14 Thread Bob Showalter
Marco Perl wrote: > Hi, Could you tell me what version of Linux is the most stable and > with most lib modules to do pearl and perl/TK? http:/www.freebsd.org I couldn't resist... :~) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Date module

2004-07-14 Thread Pam Derks
Hi all, I'm in search of a module that will give me the day of a week for a particular date. So for example, July 21 would return Wed I checked CPAN but nothing jumped out at me. Any ideas? Thanks in advance, Pam -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: Help a newbie to pick best version of Linux for Perl and perl/TK.

2004-07-14 Thread Harald Richard Ashburner
Marco Perl said: > >Hi, Could you tell me what version of Linux is the most stable and > >with most lib modules to do pearl and perl/TK? > Hi Marco, Hmmm, how to start a flame war :) I use debian myself, which has a reputation for stability. So what. They're all good. I reccomend using whatever

RE: Date module

2004-07-14 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Pam Derks wrote: > Hi all, > > I'm in search of a module that will give me the day of a week for a > particular date. > So for example, July 21 would return Wed > > I checked CPAN but nothing jumped out at me. > There are a number of modules, but for what you want, it would be just as ea

RE: $^T inconsistant?

2004-07-14 Thread Wiggins d Anconia
> On Wed, 14 Jul 2004 13:26:36 -0400, Bob Showalter wrote > > > > I second the "huh?" > > > > How did prototyping relate to the trouble with $^T? > > > > How do you define "support prototyping properly?" > > Basically because of my implementation of named parameters. I was passing > -value ins

Re: $^T inconsistant?

2004-07-14 Thread Randal L. Schwartz
> "Perl" == Perl Org <[EMAIL PROTECTED]> writes: Perl> I mistyped on my last post - I have seen suggestions that Perl> prototypes should not even be used. Is there a difinitive Perl> answer on this? Yes. Don't use prototypes. :-) -- Randal L. Schwartz - Stonehenge Consulting Services, In

Re: Date module

2004-07-14 Thread Wiggins d Anconia
> Hi all, > > I'm in search of a module that will give me the day of a week for a > particular date. > So for example, July 21 would return Wed > > I checked CPAN but nothing jumped out at me. > Nothing at all? http://search.cpan.org/modlist/Data_and_Data_Types/Date http://search.cpan.org/~stb

Re: Extracting headers of a Table in Perl.

2004-07-14 Thread Nicolay A. Vasiliev
Hello, Jason Corbett! You need to learn about $sth->{'NAME'}. Use perldoc dbd::mysql. I want to query a database and get data, but the headers don't come back. Is there a way that I can extract the headers of a table using Perl? Would it be easier to create a format, or should this be done in my

RE: $^T inconsistant?

2004-07-14 Thread perl.org
On Wed, 14 Jul 2004 13:06:24 -0600, Wiggins d Anconia wrote > > Yikes, funny I see this as a feature. You were still passing the wrong > value, your sub should validate the parameters itself, presuming > thorough code, it would still have caused an error. No comprende. > Typed return value, yi

RE: $^T inconsistant?

2004-07-14 Thread Bob Showalter
perl.org wrote: > I would like to use them if just for documentation purposes - it is > just slightly more clear to me to see > > sub something( $$$ ) > { > > than > > sub something > { Except that those are different in much more that just "documentation". Don't go that way... -- To unsubscr

RE: $^T inconsistant?

2004-07-14 Thread perl.org
On Wed, 14 Jul 2004 15:33:21 -0400, Bob Showalter wrote > > Except that those are different in much more that just "documentation". > Don't go that way... I still don't understand the reasoning for this - how could adding more to the sub signature be worse than not having any? Is there a URL tha

Re: $^T inconsistant?

2004-07-14 Thread James Edward Gray II
On Jul 14, 2004, at 2:27 PM, perl.org wrote: I would like to use them if just for documentation purposes - it is just slightly more clear to me to see sub something( $$$ ) { than sub something { In Perl, we write that: sub something { my($param1, $param2, $etc) = @_; # } Jame

RE: $^T inconsistant?

2004-07-14 Thread Bob Showalter
perl.org wrote: > On Wed, 14 Jul 2004 15:33:21 -0400, Bob Showalter wrote > > > > Except that those are different in much more that just > > "documentation". Don't go that way... > > I still don't understand the reasoning for this - how could adding > more to the sub signature be worse than not h

RE: $^T inconsistant?

2004-07-14 Thread perl.org
On Wed, 14 Jul 2004 15:45:52 -0400, Bob Showalter wrote > perl.org wrote: > > > > I still don't understand the reasoning for this - how could adding > > more to the sub signature be worse than not having any? > > This is explained in perldoc perlsub. What section are you referring to? The versi

Re: $^T inconsistant?

2004-07-14 Thread James Edward Gray II
On Jul 14, 2004, at 2:50 PM, perl.org wrote: This does kindof make me laugh though: "Alphanumerics have been intentionally left out of prototypes for the express purpose of someday in the future adding named, formal parameters" Sorry in advance to anyone who will inform me that's copyrighted conte

RE: $^T inconsistant?

2004-07-14 Thread Bob Showalter
perl.org wrote: > On Wed, 14 Jul 2004 15:45:52 -0400, Bob Showalter wrote > > perl.org wrote: > > > > > > I still don't understand the reasoning for this - how could adding > > > more to the sub signature be worse than not having any? > > > > This is explained in perldoc perlsub. > > What sectio

RE: $^T inconsistant?

2004-07-14 Thread Wiggins d Anconia
> On Wed, 14 Jul 2004 15:33:21 -0400, Bob Showalter wrote > > > > Except that those are different in much more that just "documentation". > > Don't go that way... > > I still don't understand the reasoning for this - how could adding more to the > sub signature be worse than not having any? Is t

RE: $^T inconsistant?

2004-07-14 Thread perl.org
On Wed, 14 Jul 2004 15:55:35 -0400, Bob Showalter wrote > >It's probably best to prototype new functions, not retrofit > prototyping >into older ones. OK, unless I'm missing something, I will only prototype my functions, not the legacy code here. -- To unsubscribe, e-mail: [EMA

Re: $^T inconsistant?

2004-07-14 Thread James Edward Gray II
On Jul 14, 2004, at 3:18 PM, perl.org wrote: OK, unless I'm missing something, I will only prototype my functions, not the legacy code here. We're trying to teach you Perl. Please remember that. It's why you are here. Most of us Perl users aren't big on prototyping. As far as I'm concerned,

Help a newbie to fix a TK GUI script with toolbar children.

2004-07-14 Thread Marco Perl
Hi Team , I am always grateful for your help. in a TK-GUI how to show grand-children of a child from toolbar. I developed a TK-module for ActivePerl in Win-2000 env. this script has a toolbar with 5 toolbar-items. one of these items called "Tests" has a child called "Child...>" who has grand

Re: $^T inconsistant?

2004-07-14 Thread perl.org
On Wed, 14 Jul 2004 15:31:00 -0500, James Edward Gray II wrote > > We're trying to teach you Perl. Please remember that. It's why you > are here. This sure can be an unfriendly list... > Most of us Perl users aren't big on prototyping. As far as I'm > concerned, it creates more issues than

RE: $^T inconsistant?

2004-07-14 Thread Jenda Krynicky
From: "perl.org" <[EMAIL PROTECTED]> > On Wed, 14 Jul 2004 13:06:24 -0600, Wiggins d Anconia wrote > > Typed return value, yikes, you have just cut out half of the value > > of using a 4GL... Back to C with you! ;-) Let's see if we can get > > P5P to implement pointer arithmetic for references...u

Re: $^T inconsistant?

2004-07-14 Thread James Edward Gray II
On Jul 14, 2004, at 3:39 PM, perl.org wrote: On Wed, 14 Jul 2004 15:31:00 -0500, James Edward Gray II wrote We're trying to teach you Perl. Please remember that. It's why you are here. This sure can be an unfriendly list... That was my Nice Voice, actually. Ask the list. I ran off some guy usi

Re: Data File getting set to an empty file

2004-07-14 Thread Jenda Krynicky
From: "Nigel Peck" <[EMAIL PROTECTED]> > I have a (possible) problem with a script that records the number of > page views for various pages on a site (full script below). > > Every so often (60 days or more) the data file (data.xml) loses all > it's data and is still there but empty. Waitasecond

Re: $^T inconsistant?

2004-07-14 Thread perl.org
On Wed, 14 Jul 2004 15:53:45 -0500, James Edward Gray II wrote > On Jul 14, 2004, at 3:39 PM, perl.org wrote: > > That was my Nice Voice, actually. Ask the list. I ran off some guy > using my Mean Voice recently. No problem, I tend to upset a lot of people in a lot of forums. People seem a li

RE: $^T inconsistant?

2004-07-14 Thread perl.org
On Wed, 14 Jul 2004 22:49:42 +0200, Jenda Krynicky wrote > > And does the language-that-should-not-be-named support this? > > ($x, $y) = some_function( $some, $params); Sure, a method can return an array (or a Hash, depending on your object types). It's just generally considered bad progr

Uploading problems

2004-07-14 Thread Mike Blezien
Hello, got a script that uploads images, and have used the same coding before with no problems, worked like a charm. But for some reason, when I use this coding now, it produces a '0' bytes size image, the image is upload OK, in the proper folder, the correct image name is created, but it's zer

Calling Expect Script From a Perl Program

2004-07-14 Thread Ravinder Arepally
Calling Expect Script From a Perl Program, the perl program works fine when executed in foreground (i.e on command line) but its does not working in back ground (i.e schedule in a cron)..but if I call the same expect script from a shell program it works both in back ground and foreground. Your he

RE: $^T inconsistant?

2004-07-14 Thread Jenda Krynicky
From: "perl.org" <[EMAIL PROTECTED]> > On Wed, 14 Jul 2004 22:49:42 +0200, Jenda Krynicky wrote > > > > And does the language-that-should-not-be-named support this? > > > > ($x, $y) = some_function( $some, $params); > > Sure, a method can return an array (or a Hash, dependi

Breaking up a large text stirng

2004-07-14 Thread David Clarke
Hi, I have a string of text that is thousands of characters in length. And I want to break it up into smaller records of say 500 or 600 characters. Is there a Perl command to help to do this or am I stuck with looping through the large input record and counting field positions myself. Thanks a

RE: Breaking up a large text stirng

2004-07-14 Thread Wagner, David --- Senior Programmer Analyst --- WGO
David Clarke wrote: > Hi, I have a string of text that is thousands of characters in > length. And I want to break it up into smaller records of say 500 or > 600 characters. Is there a Perl command to help to do this or am I > stuck with looping through the large input record and counting field > p

Re: Breaking up a large text stirng

2004-07-14 Thread Jeff 'japhy' Pinyan
On Jul 15, David Clarke said: >Hi, I have a string of text that is thousands of characters in length. >And I want to break it up into smaller records of say 500 or 600 >characters. Is there a Perl command to help to do this or am I stuck with >looping through the large input record and counting fi

search text

2004-07-14 Thread manojkumar vajram
Plz. help me . I am new to perl I want to accept a pattern from screen and search the pattern in my one or two text data base and print the details The pattern from screen may consist spaces and special char. line / - etc. I use redhat linux 8.0 I have coded like below but fetched no result code--

Need to write a pop3 attachment fetch program

2004-07-14 Thread C.F. Scheidecker Antunes
Hello all, Although I have done this same thing in PHP and Java before I have an urgent need to accomplish it in Perl due to specific requirements. What I need is to write an application that: - Access a pop3 remote account - Iterate through the list of messages on the server - Download the attac

Re: Need to write a pop3 attachment fetch program

2004-07-14 Thread Morbus Iff
>What I need is to write an application that: >- Access a pop3 remote account >- Iterate through the list of messages on the server >- Download the attachments and save them localy on the machine >- delete all downloaded messages See http://disobey.com/detergent/code/leecharoo/leechpop.pl The code

Re: $^T inconsistant?

2004-07-14 Thread Robin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 15 July 2004 07:08, Randal L. Schwartz wrote: > Yes. Don't use prototypes. Why not? And is there another way to ensure things like lists are passed as references? - -- Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]>