Re: a program problem for print?

2003-07-10 Thread Sudarshan Raghavan
Julie Xu wrote: Greeting, I am trying to create a simple perl script to read a text file (8 columns separated by space) and output the colume6,8. The file format is: Entry11 entry12 entry13 entry14 entry15 entry16 entry17 entry18 Entry21 entry22 entry23 entry24 entry25 entry26 entry27 entry28

a program problem for print?

2003-07-10 Thread Julie Xu
Greeting, I am trying to create a simple perl script to read a text file (8 columns separated by space) and output the colume6,8. The file format is: Entry11 entry12 entry13 entry14 entry15 entry16 entry17 entry18 Entry21 entry22 entry23 entry24 entry25 entry26 entry27 entry28 .

Re: How to invoke the Linux KDE browser?

2003-07-10 Thread Wiggins d'Anconia
Frank B. Ehrenfried wrote: Does anyone know how to invoke the linux/KDE web browser from a perl = scrpt? Well presumably with either a 'system' or using the backticks like most other IPC, but I doubt that is going to get you much unless Konqueror is far cooler than I am aware (which is certainly

Re: regular expression as argument

2003-07-10 Thread John W. Krahn
"Ling F. Zhang" wrote: > > Is is possible to pass a regular express as the > parameter of an argument... Yes. You can use the qr// operator to store a regular expression in a scalar. > for example (a stupid one): > > I want to write a function search such that when I > call: > search ($string,

Re: Regex parsing question

2003-07-10 Thread John W. Krahn
Perl wrote: > > I am attempting to parse a log file that looks something like: > > 759033281 TE18 constructor - add to MDBTable > EX:/O=MSGENG/OU=EUROPE/CN=RECIPIENTS/CN=PHARWOOD > 759033281 TE18 AddRef=2 > EX:/O=MSGENG/OU=EUROPE/CN=RECIPIENTS/CN=PHARWOOD > 759033281 TE18 S-REXCH-MSG-07 > 7590

Re: joining keys

2003-07-10 Thread John W. Krahn
Sharad Gupta wrote: > > Hi Friends, Hello, > I have a hash whose values can be either array, hash etc. > > say i have: > > my $self = { > 'hello how' => { > 'r u' => 'I am', > > > }, > 'fine thank' => ['you'], > 'see ya'=> 'next ti

regular expression as argument

2003-07-10 Thread Ling F. Zhang
Is is possible to pass a regular express as the parameter of an argument... for example (a stupid one): I want to write a function search such that when I call: search ($string,/^T.../) that basically just do $string =~ m/^T.../ __ Do you Yahoo!? SBC Yahoo! DSL -

How to invoke the Linux KDE browser?

2003-07-10 Thread Frank B. Ehrenfried
Does anyone know how to invoke the linux/KDE web browser from a perl = scrpt?

Re: help needed for LWP

2003-07-10 Thread Oliver Schnarchendorf
On Thu, 10 Jul 2003 15:40:56 -0700, charu wrote: > can anyone please guide me as to where i am going wrong. > hopign for some geek to help me soon Hello charu, the script that you wrote had some problems. You might want to use the following modules every time you write scripts u

Re: Hiding Params in url

2003-07-10 Thread Leonard Daly
At 01:29 PM 7/10/03 -0500, ryan whippo wrote: I have an application that passes params around in the url. We need to hide these for security reasons. We also don't want to have to change a lot of code. Any ideas? Ryan, I presume that you mean you are using the GET method (which tacks the param

Regex parsing question

2003-07-10 Thread Perl
I am attempting to parse a log file that looks something like: 759033281 TE18 constructor - add to MDBTable EX:/O=MSGENG/OU=EUROPE/CN=RECIPIENTS/CN=PHARWOOD 759033281 TE18 AddRef=2 EX:/O=MSGENG/OU=EUROPE/CN=RECIPIENTS/CN=PHARWOOD 759033281 TE18 S-REXCH-MSG-07 759033281 TE18 S-REXCH-MSG-06 7590

Re: Hiding Params in url

2003-07-10 Thread Liam Quin
On Thu, Jul 10, 2003 at 01:29:06PM -0500, ryan whippo wrote: > I have an application that passes params around in the url. We need to > hide these for security reasons. We also don't want to have to change a > lot of code. Any ideas? Yes... don't do this. Anything in the URL is visible, as is

joining keys

2003-07-10 Thread Gupta, Sharad
Hi Friends, I have a hash whose values can be either array, hash etc. say i have: my $self = { 'hello how' => { 'r u' => 'I am',

help needed for LWP

2003-07-10 Thread charu
i am a beginner to this world of perl. i am not able to run my script using the LWP package. i couldn't figure out what was the error. can anyone tell me where to save the file and how to open it precisely. i ma using Windows 2000 (can i use IIS as the server?) . Also, does the LWP package req

Re: How to end a while(1) loop

2003-07-10 Thread Tim Yohn
On Thu, 2003-07-10 at 17:30, Michael Weber wrote: > Here's the basic frame of code I'm using: > > #!/usr/bin/perl -w > > use strict; > > my $line; > > while(1) { > $line = ; > # Highlighting code goes here... > print $line; > } > I would suggest using the following

RE: Net::FTP

2003-07-10 Thread Dan Muey
> > On Thu, 10 Jul 2003 21:56:17 +0100, "Rob Dixon" > <[EMAIL PROTECTED]> wrote: > > > [EMAIL PROTECTED] wrote: > > > - Original Message - > > > From: Rob Dixon <[EMAIL PROTECTED]> > > > Date: Thursday, July 10, 2003 11:36 am > > > Subject

Re: Passing file handles to sub-routines ...

2003-07-10 Thread John W. Krahn
Deb wrote: > > At 16:10:24, on 07.10.03: > Cracks in my tinfoil beanie allowed Jamie Risk to seep these bits into my brain:, > > I'm a casual PERL programmer at best, and I have a working facsimile of the > > non-working code below. When I run it, I get an error "print() on closed > > filehandle

RE: Net::FTP

2003-07-10 Thread Dan Muey
> [EMAIL PROTECTED] wrote: > > - Original Message - > > From: Rob Dixon <[EMAIL PROTECTED]> > > Date: Thursday, July 10, 2003 11:36 am > > Subject: Re: Net::FTP > > > > > Dan Muey wrote: > > > > > > What I'd like to do is simply: > > > > > > (WHERE exists() is hopefully a solution to my fi

How to end a while(1) loop

2003-07-10 Thread Michael Weber
I am trying to write a simple filter that will mark in different colors certain words as they pass through. For example, if I do a tail -f /var/log/messages I want words I am looking for to be in red and other words in yellow with the rest of the text unchanged. (There might be a way to do this a

anyone ever use Test::FIT?

2003-07-10 Thread McMahon, Christopher x66156
I'm on a fishing expedition. I've discovered that a FIT framework exists for Perl at http://search.cpan.org/author/INGY/Test-FIT-0.11/lib/Test/FIT.pm , which is an implementation of Ward Cunningham's user-test FIT framework de

Re: Net::FTP

2003-07-10 Thread wiggins
On Thu, 10 Jul 2003 21:56:17 +0100, "Rob Dixon" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > - Original Message - > > From: Rob Dixon <[EMAIL PROTECTED]> > > Date: Thursday, July 10, 2003 11:36 am > > Subject: Re: Net::FTP > >

Re: Question on For loop usage in Perl

2003-07-10 Thread Jenda Krynicky
Date sent: Thu, 10 Jul 2003 14:03:32 -0700 (PDT) From: Hari Krishnaan <[EMAIL PROTECTED]> Subject:Question on For loop usage in Perl To: [EMAIL PROTECTED] > Hello all, > I was using a for loop in the following manner in one of my p

Re: Why didn't this work? References and capturing

2003-07-10 Thread KEVIN ZEMBOWER
Wow, thanks, Jenda, I'll experiment with your suggestions tomorrow. Thanks, again. -Kevin >>> Jenda Krynicky <[EMAIL PROTECTED]> 07/10/03 04:02PM >>> From: KEVIN ZEMBOWER <[EMAIL PROTECTED]> > I'm trying to clean up some data and load it into a database. > > One transformation I have to do is s

Question on For loop usage in Perl

2003-07-10 Thread Hari Krishnaan
Hello all, I was using a for loop in the following manner in one of my perl programs. for($j=31, $n=$initial;$j>=0,$n<=$final;$j--,$n++) { # Executing statements here } 1) Is it legal in perl to use the for loop as mentioned above ? 2) If so when i compile perl gives a message as follows : "

Re: Packaging perl interpreter & appl into DLL?

2003-07-10 Thread Jenda Krynicky
From: "Fuchs, Christopher" <[EMAIL PROTECTED]> > I have a perl application and I've got to install it on other people's > windows based PCs. Is there a way of packaging the perl interpreter > and the application along with the required cpan modules into a DLL? Are you sure you did not mean an EXE

Re: Net::FTP

2003-07-10 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > - Original Message - > From: Rob Dixon <[EMAIL PROTECTED]> > Date: Thursday, July 10, 2003 11:36 am > Subject: Re: Net::FTP > > > Dan Muey wrote: > > > > > What I'd like to do is simply: > > > > > (WHERE exists() is hopefully a solution to my first > > > > > quest

Re: Looking for elegance ...

2003-07-10 Thread Rob Dixon
Jamie Risk wrote: > "Rob Dixon" <[EMAIL PROTECTED]> wrote in message > > > > Jamie Risk wrote: > > > > > > It's been my experience that readers of this group relish a > > > demonstration of their persnicketiness. > > > > pernickety > > > > adj : characterized by excessive precision and attentio

Packaging perl interpreter & appl into DLL?

2003-07-10 Thread Fuchs, Christopher
Hello, I have a perl application and I've got to install it on other people's windows based PCs. Is there a way of packaging the perl interpreter and the application along with the required cpan modules into a DLL? Alternatively, is there an mechanism on windows (which I know little about) whic

Re: [cgiapp] Hiding Params in url

2003-07-10 Thread Brett Sanger
On Thu, Jul 10, 2003 at 01:29:06PM -0500, ryan whippo wrote: > I have an application that passes params around in the url. We need to > hide these for security reasons. We also don't want to have to change a > lot of code. Any ideas? Hiding params doesn't add any level of real security. So lo

Re: Substituting a space with a comma

2003-07-10 Thread Rob Dixon
Deb wrote: > Rob, you were very helpful in showing me how the split and join > work, but > since I wasn't looking to change anything in $line except to > replace the character separating the email addrs, I used what you > gave me, and rebuilt > the $line. I think it's kinda ugly, though, and I'm w

Re: Passing file handles to sub-routines ...

2003-07-10 Thread deb
Please see correction, below: At 13:14:50, on 07.10.03: Cracks in my tinfoil beanie allowed deb to seep these bits into my brain:, > Try this (untested): > #The variable $fh is not a filehandlie - you need to assign that: > > my $fh = "somefile"; > This line isn't quite right: > open (FILE, ">$f

DBD::ODBC and Unix

2003-07-10 Thread Mame Mbodji
Hello All: I have a perl program that process a form survey and store the data posted into an Access table. Now the table is on my local PC and I want the program to run on a Unix server on a different machine. I am using the DBD::ODBC to connect to the database. Question: Do you think if this wil

Re: Passing file handles to sub-routines ...

2003-07-10 Thread deb
Try this (untested): #The variable $fh is not a filehandlie - you need to assign that: my $fh = "somefile"; open (FILE, ">$fh test") || die $!; # Open file for writing while () { print FILE "Hello\n"; } close (FILE); Some would say you don't need to do the close. Some say you do. I usually

RE: Passing file handles to sub-routines ...

2003-07-10 Thread Bob Showalter
Jamie Risk wrote: > I'm a casual PERL programmer at best, and I have a working facsimile > of the non-working code below. When I run it, I get an error > "print() on closed filehandle $fh at ./test.pl line [n]". > > This is just my first step to being able to pass file handles to my > sub-routine

Re: Passing file handles to sub-routines ...

2003-07-10 Thread Rob Dixon
Jamie Risk wrote: > I'm a casual PERL programmer at best The best Perl programmers are the most casual :) > I have a working facsimile of the non-working code below. > When I run it, I get an error "print() on closed filehandle > $fh at ./test.pl line [n]". > > This is just my first step to being

Re: Looking for elegance ...

2003-07-10 Thread Jamie Risk
> I think we can safely assume that Jamie meant the other definition... Alas, that's true. Good thing people gave me the benefit of the doubt. All sorts of useful information comes from asking a question on this group! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-

Passing file handles to sub-routines ...

2003-07-10 Thread Jamie Risk
I'm a casual PERL programmer at best, and I have a working facsimile of the non-working code below. When I run it, I get an error "print() on closed filehandle $fh at ./test.pl line [n]". This is just my first step to being able to pass file handles to my sub-routines. What have I missed? open

Re: Why didn't this work? References and capturing

2003-07-10 Thread Jenda Krynicky
From: KEVIN ZEMBOWER <[EMAIL PROTECTED]> > I'm trying to clean up some data and load it into a database. > > One transformation I have to do is strip quotation marks from a lot of > fields, so I did this: >foreach my $varref (\$budgetdesc, \$thru_date, \$from_date, >\$active, \$on_off_camp

Re: Looking for elegance ...

2003-07-10 Thread Jamie Risk
Your response is a fascinating example of the word! ;) "Rob Dixon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Jamie. > > Jamie Risk wrote: > > > > It's been my experience that readers of this group relish a > > demonstration of their persnicketiness. > > pernickety > > a

Why didn't this work? References and capturing

2003-07-10 Thread KEVIN ZEMBOWER
I'm trying to clean up some data and load it into a database. One transformation I have to do is strip quotation marks from a lot of fields, so I did this: foreach my $varref (\$budgetdesc, \$thru_date, \$from_date, \$active, \$on_off_campus, \$old_budget, \$bregion, \$funding, \$finanalyst,

Re: Rename files script - a first effort

2003-07-10 Thread John W. Krahn
Pete Emerson wrote: > > John W. Krahn wrote: > > > >Due to way some file systems work I would store the file names in an > >array and use the array to rename the files instead of renaming them in > >the File::Find::find() sub. > > > Can you expand on this a little? Is this a performance issue or a

Re: array or scalar for display?

2003-07-10 Thread Rob Dixon
Paul Archer wrote: > (As I noted in an earlier post) I'm writing a handler for an LCD > display (a BPP-440 from Scott Edwards (www.seetron.com)). The > display is 4 lines x 40 characters, and has direct cursor > positioning. > I'm going to store the data for several virtual screens, but I > don't k

Re: array or scalar for display?

2003-07-10 Thread Jenda Krynicky
From: Paul Archer <[EMAIL PROTECTED]> > (As I noted in an earlier post) I'm writing a handler for an LCD > display (a BPP-440 from Scott Edwards (www.seetron.com)). The display > is 4 lines x 40 characters, and has direct cursor positioning. I'm > going to store the data for several virtual screens

Re: [OT] RE: Looking for elegance ...

2003-07-10 Thread Rob Dixon
Ed Christian wrote: > http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=persnickety > http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=pernickety > > Though "pernickety" seems to have evolved 100 years before > "persnickety", "persnickety" seems to be the preferred spelling... > > (t

Re: [OT] RE: Looking for elegance ...

2003-07-10 Thread Rob Dixon
Ed Christian wrote: > http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=persnickety > http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=pernickety > > Though "pernickety" seems to have evolved 100 years before > "persnickety", "persnickety" seems to be the preferred spelling... > > (t

[OT] RE: Looking for elegance ...

2003-07-10 Thread Ed Christian
http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=persnickety http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=pernickety Though "pernickety" seems to have evolved 100 years before "persnickety", "persnickety" seems to be the preferred spelling... (taken from Merriam-Webster's Onli

RE: Hiding Params in url

2003-07-10 Thread Dan Muey
> > I have an application that passes params around in the url. > We need to hide these for security reasons. We also don't You could use the post method instead of get but then they just view source and see them. > want to have to change a lot of code. Any ideas? Pay someone to do it for

Re: Rename files script - a first effort

2003-07-10 Thread Pete Emerson
John W. Krahn wrote: Just a couple of comments if you don't mind. (I knew you wouldn't :-) Of course not, that's how I keep on learning! :) Due to way some file systems work I would store the file names in an array and use the array to rename the files instead of renaming them in the File::Fi

Re: Looking for elegance ...

2003-07-10 Thread Robin Norwood
"Rob Dixon" <[EMAIL PROTECTED]> writes: > 'Other'? I got mine from dictionary.com and I think it means > pretty much the same thing. > > BTW, my Chambers (English, real paper :) says that it's of Scots > origin, meaning 'finical' (excessively precise in unimportant matters) > or 'foppish' (affect

Hiding Params in url

2003-07-10 Thread ryan whippo
I have an application that passes params around in the url. We need to hide these for security reasons. We also don't want to have to change a lot of code. Any ideas? Thanks, Ryan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Looking for elegance ...

2003-07-10 Thread Rob Dixon
Robin Norwood wrote: > "Rob Dixon" <[EMAIL PROTECTED]> writes: > > > Hi Jamie. > > > > Jamie Risk wrote: > > > > > > It's been my experience that readers of this group relish a > > > demonstration of their persnicketiness. > > > > pernickety > > > > adj : characterized by excessive precision an

Re: Rename files script - a first effort

2003-07-10 Thread Paul Johnson
Barry C.Hawkins said: > On Thursday, Jul 10, 2003, at 13:07 US/Eastern, Pete Emerson wrote: > >> Barry, >> >> I just wrote my own version of your script. Not that it's better than >> yours, just different. I've learned a lot from this list by seeing how >> people do things differently than me! I

Re: array or scalar for display?

2003-07-10 Thread Paul Johnson
Paul Archer said: > (As I noted in an earlier post) I'm writing a handler for an LCD display > (a > BPP-440 from Scott Edwards (www.seetron.com)). The display is 4 lines x 40 > characters, and has direct cursor positioning. > I'm going to store the data for several virtual screens, but I don't kno

Re: Rename files script - a first effort

2003-07-10 Thread John W. Krahn
Pete Emerson wrote: > > I just wrote my own version of your script. Not that it's better than > yours, just different. I've learned a lot from this list by seeing how > people do things differently than me! I hope you find my version helpful. > > A couple of notes about mine: > > 1) The director

Re: silly question

2003-07-10 Thread zentara
On 09 Jul 2003 09:09:34 -0700, [EMAIL PROTECTED] (John Tarn) wrote: >i am still a novice in perl so forgive me for this simple question. >what is socket programming? what do sockets do? is there a site >that can explain them to me? thanks >From a really simple viewpoint, I compare sockets to the

array or scalar for display?

2003-07-10 Thread Paul Archer
(As I noted in an earlier post) I'm writing a handler for an LCD display (a BPP-440 from Scott Edwards (www.seetron.com)). The display is 4 lines x 40 characters, and has direct cursor positioning. I'm going to store the data for several virtual screens, but I don't know whether it would be better

Re: Looking for elegance ...

2003-07-10 Thread Robin Norwood
"Rob Dixon" <[EMAIL PROTECTED]> writes: > Hi Jamie. > > Jamie Risk wrote: > > > > It's been my experience that readers of this group relish a > > demonstration of their persnicketiness. > > pernickety > > adj : characterized by excessive precision and attention to trivial details > > > Is

Re: Looking for elegance ...

2003-07-10 Thread Rob Dixon
Hi Jamie. Jamie Risk wrote: > > It's been my experience that readers of this group relish a > demonstration of their persnicketiness. pernickety adj : characterized by excessive precision and attention to trivial details Is this what you meant? It doesn't tie in with your subject line. And

Re: Looking for elegance ...

2003-07-10 Thread Jamie Risk
Thanks, pleasingly simple. > CHOOSE ONE (untested). > > # > # list slice (v. ugly) > # > my ($desc, @list) = (split /\t/, $_, 6)[4,0..3,5]; > > # > # splice > # > my @list = split (/\t/, $_, 6); > my $desc = splice(@list, 4, 1); > -- To unsubscribe

Re: Rename files script - a first effort

2003-07-10 Thread Barry C . Hawkins
On Thursday, Jul 10, 2003, at 13:07 US/Eastern, Pete Emerson wrote: Barry, I just wrote my own version of your script. Not that it's better than yours, just different. I've learned a lot from this list by seeing how people do things differently than me! I hope you find my version helpful. A c

Re: Rename files script - a first effort

2003-07-10 Thread Pete Emerson
Barry, I just wrote my own version of your script. Not that it's better than yours, just different. I've learned a lot from this list by seeing how people do things differently than me! I hope you find my version helpful. A couple of notes about mine: 1) The directory is taken from the command

Re: Net::FTP

2003-07-10 Thread mgoland
- Original Message - From: Rob Dixon <[EMAIL PROTECTED]> Date: Thursday, July 10, 2003 11:36 am Subject: Re: Net::FTP > Dan Muey wrote: > > > > What I'd like to do is simply: > > > > (WHERE exists() is hopefully a solution to my first question) > > > > > > > > if($ftp->exists($file)) {

RE: Why is $_ being change.

2003-07-10 Thread Paul Kraus
From: "Paul Kraus" <[EMAIL PROTECTED]> > That did correct the problem. I don't understand what local $_; did. > So a while loop will change $_ if it is inside a foreach loop since > both use $_? Please do not top-post! local stores the actual value of a global variable, undefines it and restor

RE: Why is $_ being change.

2003-07-10 Thread Jenda Krynicky
From: "Paul Kraus" <[EMAIL PROTECTED]> > That did correct the problem. I don't understand what local $_; did. > So a while loop will change $_ if it is inside a foreach loop since > both use $_? Please do not top-post! local stores the actual value of a global variable, undefines it and restores

Re: Looking for elegance ...

2003-07-10 Thread Jenda Krynicky
From: Robin Norwood <[EMAIL PROTECTED]> > "Jamie Risk" <[EMAIL PROTECTED]> writes: > > > It's been my experience that readers of this group relish a > > demonstration of their persnicketiness. For this I give the > > following; it works, but doesn't appeal to me: > > > >my @tmp_list; > >

Re: Why is $_ being change.

2003-07-10 Thread Elias Assmann
On Thu, Jul 10, 2003 at 12:28:17PM -0400, Paul Kraus wrote: > That did correct the problem. I don't understand what local $_; did. > So a while loop will change $_ if it is inside a foreach loop since both > use $_? Read M.J. Dominus' "Coping with Scoping", available at http://perl.plover.com/FAQ

Re: Looking for elegance ...

2003-07-10 Thread Steve Grazzini
On Thu, Jul 10, 2003 at 12:26:59PM -0400, Jamie Risk wrote: > It's been my experience that readers of this group relish a > demonstration of their persnicketiness. For this I give the > following; it works, but doesn't appeal to me: > >my @tmp_list; >my @list; >my $description; >p

RE: Easy regex

2003-07-10 Thread Dan Muey
> HI all. Howdy > > I am trying to verify that a field has only numbers > > 12345 > 13456 > 34x34 The regex to check for that would be: m/^\d+$/ says match beginning with a digit, contain one or more digits, ending with a digit for(@nums) { s/\D/0/; } id substitutiing any non

Re: Looking for elegance ...

2003-07-10 Thread Robin Norwood
"Jamie Risk" <[EMAIL PROTECTED]> writes: > It's been my experience that readers of this group relish a demonstration of > their persnicketiness. For this I give the following; it works, but doesn't > appeal to me: > >my @tmp_list; >my @list; >my $description; >push @tmp_list, spl

RE: Why is $_ being change.

2003-07-10 Thread Paul Kraus
That did correct the problem. I don't understand what local $_; did. So a while loop will change $_ if it is inside a foreach loop since both use $_? -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 12:13 PM To: [EMAIL PROTECTED] Subject: R

Looking for elegance ...

2003-07-10 Thread Jamie Risk
It's been my experience that readers of this group relish a demonstration of their persnicketiness. For this I give the following; it works, but doesn't appeal to me: my @tmp_list; my @list; my $description; push @tmp_list, split(/\t/,$_,6); push @list, $tmp_list[0], $tmp_list[1],$

Re: Substituting a space with a comma

2003-07-10 Thread deb
Rob, you were very helpful in showing me how the split and join work, but since I wasn't looking to change anything in $line except to replace the character separating the email addrs, I used what you gave me, and rebuilt the $line. I think it's kinda ugly, though, and I'm wondering if there is a

Re: Easy regex

2003-07-10 Thread Rob Anderson
"Ned Cunningham" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > HI all. > > I am trying to verify that a field has only numbers > > 12345 > 13456 > 34x34 > > if it has non numbers I want to delete the non number with a zero? > > Snip > > $mil =~ s/[0-9]/$_/; > > this returns zero. >

Re: Why is $_ being change.

2003-07-10 Thread Jenda Krynicky
From: "Paul Kraus" <[EMAIL PROTECTED]> > I have two subroutines that are have unexpected results. The first is > passed an array ref to a list of file names. It then calls a > subroutine and passes a file name to that subroutine. When that > routine finishes everything in the @files that was passed

Easy regex

2003-07-10 Thread Ned Cunningham
HI all. I am trying to verify that a field has only numbers 12345 13456 34x34 if it has non numbers I want to delete the non number with a zero? Snip $mil =~ s/[0-9]/$_/; this returns zero. Any help? Ned Cunningham POS Systems Developer Monro Muffler Brake & Service 200 Holleder Parkway Ro

Rename files script - a first effort

2003-07-10 Thread Barry C . Hawkins
Hail to the list! I have just started to learn Perl, but I had a task come up that couldn't wait for my slow progress through Programming Perl, 3rd ed. This script renames files in a specified directory. It seems to work OK, but I am wondering if it could be better. By better, I mean more r

RE: Net::FTP

2003-07-10 Thread Dan Muey
> Dan Muey wrote: > > > > What I'd like to do is simply: > > > > (WHERE exists() is hopefully a solution to my first question) > > > > > > > > if($ftp->exists($file)) { > > > > $ftp->delete($file); > > > > if($ftp->exists($file)) { print "Could not delete > $file"; } else { > > > > print "$file

Re: Net::FTP

2003-07-10 Thread Rob Dixon
Dan Muey wrote: > > > What I'd like to do is simply: > > > (WHERE exists() is hopefully a solution to my first question) > > > > > > if($ftp->exists($file)) { > > > $ftp->delete($file); > > > if($ftp->exists($file)) { print "Could not delete $file"; } > > > else { print "$file is all gone"; } } e

Re: Substituting a space with a comma

2003-07-10 Thread deb
No problem, Charles. :-) Thanks for responding, though! deb At 19:34:15, on 07.09.03: Cracks in my tinfoil beanie allowed Charles K. Clarkson to seep these bits into my brain:, > [snipped code] > > Holy Cow! > > Deb, I apologize. After reading Rob's answer, I > re-read your message a

Why is $_ being change.

2003-07-10 Thread Paul Kraus
I have two subroutines that are have unexpected results. The first is passed an array ref to a list of file names. It then calls a subroutine and passes a file name to that subroutine. When that routine finishes everything in the @files that was passed to point is changed from a file name to the re

RE: Net::FTP

2003-07-10 Thread Dan Muey
> > What I'd like to do is simply: > > (WHERE exists() is hopefully a solution to my first question) > > > > if($ftp->exists($file)) { > > $ftp->delete($file); > > if($ftp->exists($file)) { print "Could not delete $file"; } else { > > print "$file is all gone"; } } else { print "$file does > no

RE: Dump Html file as output from CGI script

2003-07-10 Thread Dan Muey
> Greetings to all that is Perl Welcome back. > > Is it possible to specify using a cgi script to read and > output a Pure HTML file as output.. so that it can process > the form data.. Yes, you'll want to see CGI perl module. It can help you display html and process the form data and disp

Re: Creating a hash of arrays from row data

2003-07-10 Thread Robin Norwood
Sudarshan Raghavan <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] creates an anonymous arrayref by copying the values stored > in @values. perldoc perlref, perldoc perllol > > If you are going use this statement > push @{$ref_to_a}, [EMAIL PROTECTED]; > your while condition must be while (my @v

Re: Re: Creating a hash of arrays from row data

2003-07-10 Thread Jeroen Lodewijks
I just want to say: Thanks to all, I found all posts interesting. My program immediately started to work. And I know a lot more about references. One more slightly off topic question: Is there also a mailing list for 'intermediate' perl programmers. I subscribed to [EMAIL PROTECTED] but have ye

Re: Creating a hash of arrays from row data

2003-07-10 Thread Rob Dixon
Sudarshan Raghavan wrote: > Rob Dixon wrote: > > > I was perturbed by your post Sardushan. I'll > > try to explain why. > > > > Wait a second, my post was not an attempt to undermine Rob > Anderson's post in any manner. I apologize if the wrong message > came out. And I'll also apologize since, al

Re: Creating a hash of arrays from row data

2003-07-10 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Sudarshan Raghavan wrote: > Kevin Pfeiffer wrote: > >>In article <[EMAIL PROTECTED]>, Sudarshan Raghavan >>wrote: >>[...] >> >> >>>Reason: 'shallow copying' vs 'deep copying' >>>Read through this link >>>http://www.stonehenge.com/merlyn/UnixReview/col30.html >>>

Re: Creating a hash of arrays from row data

2003-07-10 Thread Rob Anderson
"Sudarshan Raghavan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Rob Dixon wrote: > > >I was perturbed by your post Sardushan. I'll > >try to explain why. > > > > Wait a second, my post was not an attempt to undermine Rob Anderson's > post in any manner. I apologize if the wrong