Re: Can't use global FILEHANDLEs?

2004-01-31 Thread TeamSolCO
: > 4) The application source is roughly 450 lines long, and the FAQ for this : > list asks users not to mass-post such things, otherwise I'd post it here : > en-masse for help. : If you could post it somewhere where it can be downloaded, that would be : best. I'll consider that, but people intere

Re: Can't use global FILEHANDLEs?

2004-01-31 Thread John W. Krahn
Teamsolco wrote: > > : You should check the return from unlink. > : system() returns true on failure and false on success so using 'or' will > : cause it to die on success and the $! variable will not contain any > : useful information as system() doesn't set $!. The system() entry in > : perlfun

uploading fiels from one unix server to another server usin perl cgi script.

2004-01-31 Thread Nilay Puri, Noida
Hi all, I have a task at hand , that of uplaoding file from server to another server and also pass 6 paramteres along with the file. Basically, I have to replicate the functionality provided by CFHTTP tag of COLD FUSION. I used LWP::UserAgent for the purpose. My Program is given below. #!usr/lo

understanding code

2004-01-31 Thread Nilay Puri, Noida
Hi all, Can any one walk me thru this piece of code :: while() { chomp ; $isbn =(split(/^_/, $_))[0] ; --- not able to understand what is being accessed (..)[0] unless ($KEYS{$isbn} ) isbn is a scalar variable, how keys wok on it ? { pri

Re: understanding code

2004-01-31 Thread Jan Eden
Hi, Nilay Puri, Noida wrote: >Hi all, > >Can any one walk me thru this piece of code :: > >while() >{ > chomp ; > $isbn =(split(/^_/, $_))[0] ; --- not able to understand what is >being accessed (..)[0] That's the first element of the array returned by split (you can access array elem

RE: understanding code

2004-01-31 Thread mcdavis941
"Nilay Puri, Noida" <[EMAIL PROTECTED]> wrote: >Can any one walk me thru this piece of code :: > >while() >{ >chomp ; >$isbn =(split(/^_/, $_))[0] ; --- not able to understand what is >being accessed (..)[0] >unless ($KEYS{$isbn} ) isbn is a scalar variable, how keys >wok

RE: a little help please?

2004-01-31 Thread Joel
What I meant about the command prompt was "Are all the command prompts the same? Also, could running the Activeperl software damage my system at all since it is using a command prompt? Thanks, Joel > > Also, when I opened perl, it looked like the command prompt. Is the command > > prompt acces

Re: understanding code

2004-01-31 Thread Rob Dixon
Nilay Puri wrote: > > Can any one walk me thru this piece of code :: > > while() > { > chomp ; > $isbn =(split(/^_/, $_))[0] ; --- not able to understand what is > being accessed (..)[0] > unless ($KEYS{$isbn} ) isbn is a scalar variable, how keys > wok on it ? > { > print "$_\n" ; > $K

Re: Can't use global FILEHANDLEs?

2004-01-31 Thread John McKown
On Sat, 31 Jan 2004, John W. Krahn wrote: > use POSIX 'mkfifo'; > > die "Cannot initialize $path_fifo: $!" > unless unlink $path_fifo and mkfifo $path_fifo and chmod 0600, > $path_fifo; > Just one, very minor "improvement", of the above might be: die "Cannot initialize $path_fifl: $!"

RE: a little help please?

2004-01-31 Thread John McKown
On Sat, 31 Jan 2004, Joel wrote: > > What I meant about the command prompt was "Are all the command prompts the > same? Also, could running the Activeperl software damage my system at all > since it is using a command prompt? > > Thanks, > > Joel Since Perl itself is very powerful, then a "Per

map?

2004-01-31 Thread Mallik
I couldn't understand the functionality of map in PERL. Is there anybody to help me? Thanks, Mallik. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: map?

2004-01-31 Thread Ohad Ohad
perldoc map perldoc grep They both have very semilar functionality of creating a new array from existing one. From: "Mallik" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: "Perl Beginners" <[EMAIL PROTECTED]> Subject: map? Date: Sat, 31 Jan 2004 17:38:22 +0530 I couldn't understand the fun

Re: Can't use global FILEHANDLEs?

2004-01-31 Thread TeamSolCO
: > I'm sure I read it somewhere, but I had forgotten about the qwirky : > system() return. Based on your recommendation, I have fully rewritten : > that (and similar) segment of code to be more sensitive to failure : ? (useless $! values will just come with the territory): : > : > unless ((unli

Re: map?

2004-01-31 Thread Wiggins d'Anconia
Please bottom post... Ohad Ohad wrote: perldoc map perldoc grep They both have very semilar functionality of creating a new array from existing one. Those need a '-f' to work perldoc -f map perldoc -f grep From: "Mallik" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: "Perl Beginners

Re: Can't use global FILEHANDLEs?

2004-01-31 Thread R. Joseph Newton
TeamSolCO wrote: > To start, let me say this: > 1) I have both "Learning Perl 3rd Ed" and "Programming Perl 3rd Ed" > 2) I have read "Learning Perl 3rd Ed", and I use "Programming Perl 3rd Ed" as > reference. > 3) I have searched with Google for several key words related to my problem, but the >

Re: A little help please?

2004-01-31 Thread R. Joseph Newton
Joel wrote: > I'm interested in learning to program perl, and I just got ActivePerl for Windows. I > am running XP and have a few questions. First off, how do I run the interpreter > under Windows, preferably without the XP command prompt? Spend lots of money somewhere on a fancy wrapper, whic

Re: Can't use global FILEHANDLEs?

2004-01-31 Thread Rob Dixon
Teamsolco wrote: > > To start, let me say this: > 1) I have both "Learning Perl 3rd Ed" and "Programming Perl 3rd Ed" > 2) I have read "Learning Perl 3rd Ed", and I use "Programming Perl 3rd Ed" as > reference. > 3) I have searched with Google for several key words related to my problem, but the

Re: understanding code

2004-01-31 Thread John W. Krahn
Jan Eden wrote: > > Nilay Puri, Noida wrote: > > > >Can any one walk me thru this piece of code :: > > > >while() > >{ > > chomp ; > > $isbn =(split(/^_/, $_))[0] ; --- not able to understand what is > >being accessed (..)[0] > > That's the first element of the array returned by split

Re: map?

2004-01-31 Thread Jeff 'japhy' Pinyan
On Jan 31, Mallik said: >I couldn't understand the functionality of map in PERL. Is there anybody >to help me? Did you need understanding HOW to use it, or what you'd use it FOR? If you need help with HOW to use it, I'd ask that you first read the docs perldoc -f map and then show us code yo

Re: map?

2004-01-31 Thread R. Joseph Newton
Mallik wrote: > I couldn't understand the functionality of map in PERL. Is there anybody to > help me? > > Thanks, > Mallik. In brief, map returns a list represneting the mapping of a function onto all elements of a list. The original list may or may not be affected by the function, depending on

Re: Regarding Text Widget in Perl/Tk

2004-01-31 Thread R. Joseph Newton
zentara wrote: > Try putting a "TK::after in the event loop to set the timing. Yee-haw!! Just what I was looking for! Thanks. Serendipity is a wonderful thing. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

column dumping

2004-01-31 Thread Perl
Hi, is there a smart command line ( Unix ) utility to dump out a particular column to the STDOUT/file from a file containing multi column data ? thanks, S. __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb

Re: column dumping

2004-01-31 Thread Wiggins d'Anconia
Perl wrote: Hi, is there a smart command line ( Unix ) utility to dump out a particular column to the STDOUT/file from a file containing multi column data ? thanks, S. man cut http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: perl editors

2004-01-31 Thread Robert
[EMAIL PROTECTED] wrote: Thank you, but I was hoping to have a editor compatible with Redhat and or HP and or AIX that gives you a color coded interface, such when there is a syntax error it color codes it in red. If you have ever seen or used a VB editor you know what I mean. Currently I use

Perl Style

2004-01-31 Thread Robert
When they say "uncuddled else" are they meaning: if () { # code } else { # code } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Use and Require

2004-01-31 Thread Robert
Wiggins D Anconia wrote: Mallik wrote: What is the difference between Use and Require. See perldoc -f use perldoc -f require Why do you ask? /R Wow such a civilized answer. Some would say... S R Q I R E This is such a nice list. Time to revisit: http://www.catb.org/~esr/faqs/smart-qu

RE: Perl Style

2004-01-31 Thread Tim Johnson
I would guess either that or if() { #code } else { #more code } which I have seen, usually by people who primarily code in C. -Original Message- From: Robert [mailto:[EMAIL PROTECTED] Sent: Sat 1/31/2004 2:24 PM To: [EMAIL PROTECTED]

Re: a little help please?

2004-01-31 Thread Robin Sheat
On Sat, Jan 31, 2004 at 08:51:00AM -0500, Joel wrote: > What I meant about the command prompt was "Are all the command prompts the > same? Also, could running the Activeperl software damage my system at all > since it is using a command prompt? Hmm, it looks like you have been told the whole 'the c

Re: Perl Style

2004-01-31 Thread Jeff 'japhy' Pinyan
On Jan 31, Robert said: >When they say "uncuddled else" are they meaning: A cuddled else is: if (...) { ... } else { ... } Anything other than THAT is an uncuddled else. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 htt

Re: Can't use global FILEHANDLEs?

2004-01-31 Thread TeamSolCO
This matter has already been resolved. Thank you for following up. : TeamSolCO wrote: : : > To start, let me say this: : > 1) I have both "Learning Perl 3rd Ed" and "Programming Perl 3rd Ed" : > 2) I have read "Learning Perl 3rd Ed", and I use "Programming Perl 3rd Ed" as reference. : > 3) I ha

Re: Use and Require

2004-01-31 Thread Wiggins d'Anconia
Robert wrote: Wiggins D Anconia wrote: Mallik wrote: What is the difference between Use and Require. See perldoc -f use perldoc -f require Why do you ask? /R Wow such a civilized answer. Some would say... S R Q I R E This is such a nice list. Time to revisit: http://www.catb.org/~es

Re: Array subtraction, like sets

2004-01-31 Thread Robin Sheat
On Fri, Jan 30, 2004 at 10:33:27AM -0500, Jeff 'japhy' Pinyan wrote: > sub array_diff { > my ($first, $second) = @_; > my %diff = map { "@$_" => 1 } @$second; > return [ map !$diff{"@$_"}, @$first ]; > } amended to: return [ grep !$diff{"@$_"}, @$first ]; (for the benefit of any

Re: Array subtraction, like sets

2004-01-31 Thread Jeff 'japhy' Pinyan
On Feb 1, Robin Sheat said: >On Fri, Jan 30, 2004 at 10:33:27AM -0500, Jeff 'japhy' Pinyan wrote: >> sub array_diff { >> my ($first, $second) = @_; >> my %diff = map { "@$_" => 1 } @$second; >> return [ map !$diff{"@$_"}, @$first ]; >> } >amended to: >return [ grep !$diff{"@$_"