Re: couple questions about refs

2002-12-16 Thread christopher j bottaro
cool beans, thanks. wow, perl is neat, but i fear it will make me a bad c programmer...;) so i guess there is no concept of stack and heap space when dealing with perl? just that memory will stay allocated as long as there is a way to reach it? hehe, i can't wait to abuse that fact;) ch

Re: couple questions about refs

2002-12-16 Thread John W. Krahn
Christopher J Bottaro wrote: > > hmm, something is going off in my head that says this is scary. Calm down Christopher. :-) > @array is > local to the function (lexically scoped as you would say in perl??) and you > are returning a reference to it. Yes, that is correct. > well when the functi

RE: script to download a file. Script to

2002-12-16 Thread \(William\) Wenjie Wang
How about lwp-download.bat comes with the installation of ASPerl(on Windows)? >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, 17 December 2002 5:09 AM >To: [EMAIL PROTECTED] >Subject: script to download a file. Script to > > >Hello, > >I was wonderin

Re: localtime question - zero padding - mnth discrepancy

2002-12-16 Thread John W. Krahn
Harry Putnam wrote: > > "John W. Krahn" <[EMAIL PROTECTED]> writes: > > > printf " %02d/%02d/%04d %02d:%02d:%02d\n", $lta[4] + 1, $lta[3], $lta[5] + 1900, >@lta[2,1,0]; > > Thanks.. the tips work good. And I overlooked the part about mnths > being 0-11. > > I get the idea from your posted pri

Re: couple questions about refs

2002-12-16 Thread christopher j bottaro
On Monday 16 December 2002 08:50 am, Jenda Krynicky wrote: > > i know what i really should do is this: > > sub myfunc(){ > > my @array; > > if ( some_cond ) { > > return undef; > > } > > else { > > #populate @array > > return [ @array ]; > > } > > } > > Well ... I would u

Re: localtime question - zero padding - mnth discrepancy

2002-12-16 Thread Harry Putnam
Toby Stuart <[EMAIL PROTECTED]> writes: > Check the length of second, minute and hour. > If the length == 1 then add a leading zero eg. $sec = "0" . $sec > Maybe there is some other "magical" way of doing this, if there is i'm not > aware of it :) Good idea... thanks. "John W. Krahn" <[EMAIL P

RE: getting defunct message

2002-12-16 Thread A. Johnson Jeba Asir
Hello , Thanks for the help.. the info which who have provided is very helpful for me..thanks Regards, A.Johnson !> -Original Message- !> From: A. Johnson Jeba Asir [mailto:[EMAIL PROTECTED]] !> Sent: Friday, December 13, 2002 11:05 PM !> To: [EMAIL PROTECTED] !> Subject:

Re: glob subtlety question

2002-12-16 Thread John W. Krahn
"John W. Krahn" wrote: > > David Eason wrote: > > > > Is there a better way to say: > > > > my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1; > > foreach my $doc ( @input_files ) { ... __code goes here___ } > > > > I put the unless clause in there because otherwise... > > if there are

Re: Getting a variable back

2002-12-16 Thread John W. Krahn
Bob H wrote: > > I have a program that gets an EXE file using a regex pattern and puts it > into a file variable: > > foreach(@list) { > if(m/\d{8}.*x86.exe/) { > push(@match,$_) > } > } > > I then download the matching file: > > if(scalar(@match)) { > $file=$match[$#match]

Re: Why does this code fail? - Sorry here are the line numbers..

2002-12-16 Thread John W. Krahn
Satya Devarakonda wrote: > > Thanks to all those guys who answered my question As you guys pointed out > the join worked without //s. > > But the code also had some correction to be made (eg. line number 34) and > would look really like this(and not as I initially sent you folks). > There are sti

Re: Getting a variable back

2002-12-16 Thread Dave K
Bob, Consider: cls.pl use strict; my @switches = @ARGV; foreach(@switches) { print"$_\n"; } $ perl -e ' my @clss = ("cls.pl", "one", "two", "three"); system @clss;' output: one two three Takes the first element treats it as an executable and the rest of the list as arguments. HTH "Bob H"

Re: german umlauts - how to cope with

2002-12-16 Thread John W. Krahn
Georg Koss wrote: > > A friendly hello to all of you! Hello, > As I'm posting first time here, I'd like to introduce myself as a > bloody perl-newbie ;( > > My problem: I tried to use a regexp in a word counting program and > encountered that any word with a 'german umlaut' is ignored when usin

Looking for the attachments

2002-12-16 Thread Marcelo
Hi people .. I'm using the Mail::Box modules to manipulate e-mail... but I still don't know how to obtain the names of the files attached to an e-mail...I need it to validate the type of file and its name...could somebody help me ? Thanks a lot .. -- To unsubscribe, e-mail: [EMAIL PROTECT

german umlauts - how to cope with

2002-12-16 Thread Georg Koss
A friendly hello to all of you! As I'm posting first time here, I'd like to introduce myself as a bloody perl-newbie ;( My problem: I tried to use a regexp in a word counting program and encountered that any word with a 'german umlaut' is ignored when using the following m// : $word =~ m/^[a

NET::SMTP sometimes loses From: line

2002-12-16 Thread Robert Monical
Hello, I have a perl program that sends out mail. It has been in production since 1998. It works fine in most installations. I recently changed ISPs (new: ISP outgoing mail server is mail.megapath.net) The messages are now losing the From: line. In the expanded header, the Return-Path: line is f

Re: Getting a variable back

2002-12-16 Thread Ovid
--- Bob H <[EMAIL PROTECTED]> wrote: Bob, What are you trying to accomplish? Perhaps we can help you find a more secure way of doing this. > if(scalar(@match)) { > $file=$match[$#match]; > print "Downloaded file $file\n"; > $ftp->binary(); > $ftp->get($file); > } > > I now wa

RE: Full Screen

2002-12-16 Thread Paul Kraus
Worked like a charm. I am used to running in unix/linux. Thanks!! > -Original Message- > From: Nigel Peck - MIS Web Design [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 16, 2002 4:32 PM > To: Paul Kraus; Perl > Subject: RE: Full Screen > > > Windows probably won't see it as a DOS

Getting a variable back

2002-12-16 Thread Bob H
I have a program that gets an EXE file using a regex pattern and puts it into a file variable: foreach(@list) { if(m/\d{8}.*x86.exe/) { push(@match,$_) } } I then download the matching file: if(scalar(@match)) { $file=$match[$#match]; print "Downloaded file $file\n";

Re: Why does this code fail? - Sorry here are the line numbers..

2002-12-16 Thread Satya_Devarakonda
Thanks to all those guys who answered my question As you guys pointed out the join worked without //s. But the code also had some correction to be made (eg. line number 34) and would look really like this(and not as I initially sent you folks). There are still has some issues with line 11 and I a

RE: remote hard drive stat

2002-12-16 Thread Nigel Peck - MIS Web Design
Try this module: http://search.cpan.org/author/MBLAZ/Win32-DriveInfo-0.06/DriveInfo.pm I don't know what experience you have so if that's still confusing ask again. HTH Nigel MIS Web Design http://www.miswebdesign.com/ -Original Message- From: Thomas Browner [mailto:[EMAIL PROTECTED]]

RE: Full Screen

2002-12-16 Thread Nigel Peck - MIS Web Design
Windows probably won't see it as a DOS app so that'll be why. Have you tried alt and enter (together) to get it off full screen, then right click on the top left and properties, change the properties, click ok, then save setting for future windows with same title. HTH Nigel MIS Web Design http://

remote hard drive stat

2002-12-16 Thread Thomas Browner
Is there away that I can get remote hard drive stat from windows box? Thomas

Re: DB_File to read Berkeley db

2002-12-16 Thread John W. Krahn
Ramprasad A Padmanabhan wrote: > > Hello All Hello, >I think my question is slightly misplaced in this newsgroup > I have been using DB_File.pm to read Berkely db files > Is there a similar library for C ( not C++ ) http://www.sleepycat.com/ John -- use Perl; program fulfillment -- To

Re: Matching and Filling Arrays

2002-12-16 Thread John W. Krahn
Ben Crane wrote: > > I have a dummy list: > > Dog, A, B, C > Dog, 1, 2, 3 > Cat, A, 2, 3 > > I have a unique list of the first record, Dog and > Cat...I want to look through the unique list, and then You should probably be using a hash instead of an array for the unique list. > match all the

Re: Indexed man pages?

2002-12-16 Thread R. Joseph Newton
Hi Kipp, Actually, that is not the case. there is a TOC in the navigation [left] frame of the Active State help browser, but no interactive index or text search capabilities. Each serves a critical and time-saving purpose to the developer using them. The index listings come from markups by t

Full Screen

2002-12-16 Thread Paul Kraus
When I run a Perl app in windows by double clicking on it the app opens full screen. I do not want it to run like this. I tried right clicking on it to set properties like you would for a dos app but I do not get any options. Any Ideas? Paul Kraus Network Administrator PEL Supply Company 216.267.5

Re: regex

2002-12-16 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > What is the difference between: > > $arg = "foo \(bar\)"; > and > $arg = 'foo \(bar\)'; Interpolation. Read the "Quote and Quote-like Operators" section of the perlop document. perldoc perlop > when using like: > > s/$arg/bleah/; > > One works, one doesn't. > W

Re: couple questions about refs

2002-12-16 Thread John W. Krahn
Nyimi Jose wrote: > > > From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] > > > > From: christopher j bottaro <[EMAIL PROTECTED]> > > > > > > #populate @array > > > return [ @array ]; > > > } > > > } > > > > Well ... I would use > > > > return \@array; > > > > it's a bit m

RE: regex

2002-12-16 Thread Wagner, David --- Senior Programmer Analyst --- WGO
When you use the double quotes: $arg looks like foo (bar) But when you use single quotes, there is no expansion just what you enter is what you get, so the $arg looks like foo \(bar\) Obviously the second is not what you want. SO using single quotes, you set $arg like 'foo

Re: glob subtlety question

2002-12-16 Thread John W. Krahn
David Eason wrote: > > Is there a better way to say: > > my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1; > foreach my $doc ( @input_files ) { ... __code goes here___ } > > I put the unless clause in there because otherwise... > if there are no file arguments, @input_files ends up h

regex

2002-12-16 Thread tallison
What is the difference between: $arg = "foo \(bar\)"; and $arg = 'foo \(bar\)'; when using like: s/$arg/bleah/; One works, one doesn't. Why? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Outputting to a file.

2002-12-16 Thread Wagner, David --- Senior Programmer Analyst --- WGO
This line: # Loop through all of these customers for (my $i = 0; $i < $#data; $i++) where you are doing the $#data needs to be changed to scalar(@data) or change the < $#data to <= $#data Wags ;) -Original Message- From: Caroline Warnock [mailto:[EMAIL PROTECTE

RE: regex help

2002-12-16 Thread Danny Grzenda
Thanks everyone for the help. It worked like a charm. Not actually sure how it works. Never used \G b4. My regex books says its not used very much. Thanks again. -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 6:38 PM To: [EMAIL PROTECTED

Outputting to a file.

2002-12-16 Thread Caroline Warnock
I am trying to modify a Perl script that was written by an ex employee. The script is supposed to extract customer details from our database so that the details can be transferred using sendmail to another database. The test data on the database consists of 7 customers from 1 to

script to download a file. Script to

2002-12-16 Thread William.Ampeh
Hello, I was wondering is anyone will be willing to share a Perl script to download a file with me. I tried the example on CGI::Simple, but I do not know how to make reference to my proxy server "xyx" in the script. What I ended up doing is to set the "http_server" variable outside at the shell.

Re: get COOKIES with 'HTTP_COOKIE' ??

2002-12-16 Thread Larry Coffin
>what am I doing wrong with these co-operating perl-scripts? >the first script sets a cookie, but I cant retrieve them when running >the 2nd.. >Something wrong with the $cookies=$ENV{'HTTP_COOKIE'}; >$cookies=$ENV{'HTTP_COOKIE'}; >if ($cookies=~/name=/){ > ... >} >else { > print "it doesnt

RE: Excel

2002-12-16 Thread Ovid
--- Paul Kraus <[EMAIL PROTECTED]> wrote: > I found a couple modules. But they all seem to either for getting data > from excel or creating a new excel worksheet. I need to insert data into > an excel spreadsheet that already contains data,and several worksheets. Hi Paul, If you go to http://www.

RE: Excel

2002-12-16 Thread Paul Kraus
I found a couple modules. But they all seem to either for getting data from excel or creating a new excel worksheet. I need to insert data into an excel spreadsheet that already contains data,and several worksheets. > -Original Message- > From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]]

re: using pipe

2002-12-16 Thread Sheriff Gaye
Forwarded Message Message-ID:<[EMAIL PROTECTED]>To:[EMAIL PROTECTED]:"maxchen" <[EMAIL PROTECTED]>Subject:using pipeDate:Sat, 14 Dec 2002 02:11:10 +0800 hi everyone,i am a novice to the perl and i want towrite a perl program to redirect anotherprogram's STDIN & STDOUT to pipes,it's possible or

re: using pipe

2002-12-16 Thread Sheriff Gaye
Forwarded Message Message-ID:<[EMAIL PROTECTED]>To:[EMAIL PROTECTED]:"maxchen" <[EMAIL PROTECTED]>Subject:using pipeDate:Sat, 14 Dec 2002 02:11:10 +0800 hi everyone,i am a novice to the perl and i want towrite a perl program to redirect anotherprogram's STDIN & STDOUT to pipes,it's possible or

RE: Excel

2002-12-16 Thread NYIMI Jose (BMB)
Have you checked CPAN ? http://search.cpan.org/ José. > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 16, 2002 5:52 PM > To: 'Perl' > Subject: Excel > > > Is it possible to insert data into an excel file using Perl? > If so can you point me

Excel

2002-12-16 Thread Paul Kraus
Is it possible to insert data into an excel file using Perl? If so can you point me to some info. Thanks. Paul Kraus Network Administrator PEL Supply Company 216.267.5775 Voice 216-267-6176 Fax www.pelsupply.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

RE: couple questions about refs

2002-12-16 Thread NYIMI Jose (BMB)
#!/usr/bin/perl use strict; use Benchmark; sub using_aref{ my $aref=[]; @$aref=(1,2,3,4,5); return $aref; } sub using_array{ my @array=(); @array=(1,2,3,4,5); return \@array; } And the winner is : timethese (100,{ using_aref => \&using_aref,

Re: Regexpr

2002-12-16 Thread Jeff 'japhy' Pinyan
On Dec 16, Paul Kraus said: >How can I grab a numeric string that contains commas. ... that ALSO contains periods in it. >POINTPoint Health Centers 19,466.79 >0.00 401.20 0.00 19,867.99 >if (/(^POINT)\s+ Point Health Centers\s+([\d\,]*)

Regexpr

2002-12-16 Thread Paul Kraus
How can I grab a numeric string that contains commas. String -- POINTPoint Health Centers 19,466.79 0.00 401.20 0.00 19,867.99 My Expr --- if (/(^POINT)\s+ Point Health Centers\s+([\d\,]*)\s+.*/){ print "$1 $2\n"; } What it

Re: Die horribly ?

2002-12-16 Thread Mystik Gotan
Ahh, that explains. But what exactly is pseudo-code? -- Bob Erinkveld (Webmaster Insane Hosts) www.insane-hosts.net MSN: [EMAIL PROTECTED] From: "Jenda Krynicky" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Die horribly ? Date: Mon, 16 Dec 2002 15:50:39 +0100 From: "Joh

RE: glob subtlety question

2002-12-16 Thread Bob Showalter
> -Original Message- > From: David Eason [mailto:[EMAIL PROTECTED]] > Sent: Saturday, December 14, 2002 9:53 PM > To: [EMAIL PROTECTED] > Subject: glob subtlety question > > > Is there a better way to say: > > my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1; > foreach my $doc

Re: couple questions about refs

2002-12-16 Thread Rob Richardson
Chris, I'll take a stab at this to see if my understanding of Perl is correct. Your first subroutine is acceptable under Perl, but it wouldn't be under C++. The reason is that Perl has automatic reference counting and garbage collection. Perl counts the number of references there are to data el

Re: Die horribly ?

2002-12-16 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > Mystik Gotan wrote: > > > > Hi there, > > Hello, > > > another basic Perl question up here. The last time I've seen quite > > some code using die horribly;. Actually, I've never seen this > > before. Is this a new built-in for 5.8.0? What I want to kno

Re: couple questions about refs

2002-12-16 Thread Jenda Krynicky
From: christopher j bottaro <[EMAIL PROTECTED]> > hello again, > all my c instincts tell me i shouldn't write a function like this: sub > myfunc() { > my $aref = []; > if ( some_cond ) { > return undef; > } > else { > #populate @{$aref} > return $aref; > } > }

RE: getting defunct message

2002-12-16 Thread Bob Showalter
> -Original Message- > From: A. Johnson Jeba Asir [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 13, 2002 11:05 PM > To: [EMAIL PROTECTED] > Subject: getting defunct message > > > hello people, > > When I'm trying to server which listens on > tcp port and > forking

RE: Perl Cgi/ Why?

2002-12-16 Thread NYIMI Jose (BMB)
Additional thought I've apprecitiated See ==ARCHIVE José. ==ARCHIVE -Original Message- From: Nigel Wetters [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 23, 2002 6:19 PM To: [EMAIL PROTECTED] Subject: Re: Perl vs. PHP? PHP is a good templating language, similar to ASP, JSP,

Re: Uploading files

2002-12-16 Thread zentara
On Fri, 13 Dec 2002 05:19:08 -0200, [EMAIL PROTECTED] (Andre) wrote: >Hi >I know it is not entirely perl, but can anybody esplain me how does i do upload a >file using a browser (can i use perl to do this)? >Thanks Here's a really simple method using CGI::Simple #

Re: Spreadsheet::ParseExcel date problem (year is being reformatted)

2002-12-16 Thread Max
If I use $osheetCR->{Val} the value is in incremental serial numbers from 1 jan 1900 (or 1 jan 1904 for Apple users). Example: 12-1-1946 is 16814 I can convert 16814 back to the real date with the date::calc but there must be some way to extract the year in the right format ( and not yy). M

DB_File to read Berkeley db

2002-12-16 Thread Ramprasad A Padmanabhan
Hello All I think my question is slightly misplaced in this newsgroup I have been using DB_File.pm to read Berkely db files Is there a similar library for C ( not C++ ) I have been trying google search but could get one Thanks Ram -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

get COOKIES with 'HTTP_COOKIE' ??

2002-12-16 Thread Erik Browaldh
Hello! what am I doing wrong with these co-operating perl-scripts? the first script sets a cookie, but I cant retrieve them when running the 2nd.. Something wrong with the $cookies=$ENV{'HTTP_COOKIE'}; ? thanks in advanced! Erik the first script with cookies: -

Re: Uploading files

2002-12-16 Thread mod_perl
Yes You can. 1st part print " "; print " "; print ""; print ""; select file from local machine using file field. field name is filetoupload. afeter submiting you get value of file field at server side using $filename=$q->param("filetoupload"); if(!open(OUTFILE, ">$SAVE_DIRECT

Matching and Filling Arrays

2002-12-16 Thread Ben Crane
I have a dummy list: Dog, A, B, C Dog, 1, 2, 3 Cat, A, 2, 3 I have a unique list of the first record, Dog and Cat...I want to look through the unique list, and then match all the records from the main list (as above)-matching the unique list value (Dog/Cat) with the main list...then if there are

RE: picking numbers out of a file and operating on them

2002-12-16 Thread Aman Thind
Hi, # == # # Perl Source File -- Created with SAPIEN Technologies PrimalSCRIPT(TM) # # NAME: # # AUTHOR: Aman Thind , Quark Inc # DATE : 12/16/2002 # # PURPOSE: # # ==

couple questions about refs

2002-12-16 Thread christopher j bottaro
hello again, all my c instincts tell me i shouldn't write a function like this: sub myfunc(){ my $aref = []; if ( some_cond ){ return undef; } else{ #populate @{$aref} return $aref; } } but its c

RE: array iteration & references

2002-12-16 Thread Duarte Cordeiro
I'll answer my own question: Inside optionsNextItem I'm making a copy of @{$ref}, so setting any value in that copy won't change the array (stupid me). -Original Message- From: Duarte Cordeiro Sent: Monday, December 16, 2002 9:53 AM To: '[EMAIL PROTECTED]' Subject: array iteration & ref

array iteration & references

2002-12-16 Thread Duarte Cordeiro
Hi all, I want to iteract through a array with a step = 2. Meaning, that, with a array of (1,2,3,4,5,6,7,8,9,0) I want to have 5 interactions with 2elements available in each one. (1,2), (3,4), etc. Not knowing if there is something OOTB within perl, I just: sub optionsInitialize{ my ($ref)=

parsing an excel formula

2002-12-16 Thread Hytham Shehab
hi guys, i have found that Excel::Parser and other parsing excel modules very usefull in parseing all excel data except the formula data, so how can i extract the formula from a cell ?? thx v.much -- Hytham Shehab

Re: [PHP] to php or to perl, that is the question

2002-12-16 Thread Rasmus Lerdorf
Folks, even if perhaps not intended as a troll, the effect will be the same. Please refrain from cross-posting dozens of messages. David, pick whichever language you are more comfortable with. There is pretty much nothing in one that can't be done in the other. It's like asking the Beef and Por

Extracting keys and variables, HowTo?

2002-12-16 Thread David
Hi, I would like to know how to extract the keys and variables from this line of code that are being parsed by @_ my ($class, %args) = @_; Also how would I set then so that they wouldn't have to be parsed to the script. Thanks. David. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Extracting keys and variables, HowTo?

2002-12-16 Thread David
Hi, I have a line in a script my ($class, %args) = @_; and I would like to know how to extract the values of @_ and also how to explicatly state them so that they don't have to be parsed to the script. Thanks. David. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

picking numbers out of a file and operating on them (fwd)

2002-12-16 Thread Nandita Mullapudi
How does one tell perl to perform mathematical operations? I have a file with a series of items like this: >BLAH1 Length = 500 Identities = 20/100. >BLAH2 Length = 400 Identities = 30/70 For each item called BLAH, I want to pick the denominator in Identites and divide by Length and calculate per

RE: String to Array

2002-12-16 Thread Danny Miller
Not sure if you want to keep the commas in your array, i.e. $array[$0] = 1, But, if you don't, you can do this; $string = "1, 2, 3, 4, 5"; @array = split /,/ , $string; print "@array\n"; If you want to keep the commas, simply replace /,/ with /\s/ Regards, Danny -Original Message- From

Re: Why does this code fail? - Sorry here are the line numbers..

2002-12-16 Thread Dave Storrs
On Sat, Dec 14, 2002 at 12:51:50PM -0500, [EMAIL PROTECTED] wrote: > Can somebody tell what is wrong with this. > > I tried single quote (') in place of double quote(") neither of them work. > > 184 for ($i = 0; $i < @clm_types; $i++) > 185 { > 186@temp_str = grep (/$_/,@env_desc); > 187@

Re: Net::SFTP causes script to exit if connection can't be made

2002-12-16 Thread Dave Storrs
Zentara is right about what you need to do, but a fuller explanation of the solution would have been: Net::SFTP is throwing an exception when it cannot make the connection. If the exception is not caught, it will cause your program to exit. The way you catch exceptions in Perl is to wrap the cod

Mail::POP3Client failures,...

2002-12-16 Thread cmustard
Ok, this is very frustrating, 2 days and many hours worth! I have used this module/lib (libwww) before with ease. The only thing i can think of is i could be my linux distro? (Debian Woody 3.0), or the pop-servers encrytion methods?. The following is the exact script i am trying to run, (except w

Re: glob subtlety question

2002-12-16 Thread David Eason
OOPS. I meant unless $#ARGV == -1 "David Eason" <[EMAIL PROTECTED]> wrote in message news:... > Is there a better way to say: > > my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1; > foreach my $doc ( @input_files ) { ... __code goes here___ } > > I put the unless clause in there because

glob subtlety question

2002-12-16 Thread David Eason
Is there a better way to say: my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1; foreach my $doc ( @input_files ) { ... __code goes here___ } I put the unless clause in there because otherwise... if there are no file arguments, @input_files ends up having an element [0] And the foreach

Mail::POP3Client faliure,...?

2002-12-16 Thread cmustard
Ok, this is very frustrating, 2 days and many hours worth! I have used this module/lib (libwww) before with ease. The only thing i can think of is i could be my linux distro? (Debian Woody 3.0), or the pop-servers encrytion methods?. The following is the exact script i am trying to run, (except w

Mail::POP3Client errors, not working

2002-12-16 Thread cmustard
Ok, this is very frustrating, 2 days and many hours worth! I have used this module/lib (libwww) before with ease. The only thing i can think of is i could be my linux distro? (Debian Woody 3.0), or the pop-servers encrytion methods?. The following is the exact script i am trying to run, (except w

Installed Modules don't run Properly

2002-12-16 Thread Scott Lutz
Hello All! I have searched Google, but it turned up nothing useful on this, so I figured that this would be a good place to ask next. I just installed the DBD::mysql through the Debian package manager, but it doesn't seem to bode well with the compiled version of Perl I installed on the machine

Uploading files

2002-12-16 Thread Andre
Hi I know it is not entirely perl, but can anybody esplain me how does i do upload a file using a browser (can i use perl to do this)? Thanks

picking numbers out of a file and operating on them

2002-12-16 Thread Nandita Mullapudi
How does one tell perl to perform mathematical operations? I have a file with a series of items like this: >BLAH1 Length = 500 Identities = 20/100. >BLAH2 Length = 400 Identities = 30/70 For each item called BLAH, I want to pick the denominator in Identites and divide by Length and calculate per

using pipe

2002-12-16 Thread maxchen
hi everyone, i am a novice to the perl and i want to write a perl program to redirect another program's STDIN & STDOUT to pipes, it's possible or there are source examples exist? thanks, maxchen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: again a regex help needed

2002-12-16 Thread John W. Krahn
Marco Centemeri wrote: > > Hello All, Hello, > I'd like to know if a file name is like namefile.ext (only one dot in the name) > or namefile.xxx.z.ext (more than one dot in the name). > I tried with regex: > > $file1='doctobepublish.new.pdf'; > > if ( $file1 =~ /\.{2,}/ ) { print "KO filen