Re: FW: special vars

2004-02-03 Thread Jeff 'japhy' Pinyan
On Feb 4, Nilay Puri, Noida said: >> Can any one help me understand the usage of special variable $| ? >> >> I know the description of this var. If set to nonzero, forces a flush >> after every write or print. Most filehandles buffer their output until a newline is reached. For example, try th

FW: special vars

2004-02-03 Thread Nilay Puri, Noida
> -Original Message- > From: Nilay Puri, Noida > Sent: Wednesday, February 04, 2004 11:37 AM > To: Perl (E-mail) > Subject: FW: special vars > > > > -Original Message- > From: Nilay Puri, Noida > Sent: Wednesday, February 04, 2004 11:32 AM > To:

Re: what is a pseudohash

2004-02-03 Thread Jeff 'japhy' Pinyan
On Feb 3, Michael C. Davis said: >The CPAN documentation for Apache::Reload refers to "pseudohashes". What >is a pseudohash? Does anyone know what they could be referring to? The pseudohash was a short-lived hybrid array-hash. Briefly put: $phash = [ { this => 1, that => 2, those => 3 }

Re: XML::Writer beginner problems

2004-02-03 Thread R. Joseph Newton
KEVIN ZEMBOWER wrote: > Hope it's okay to write to this group regarding beginner problems with XML::Writer. > I'm a beginner both to XML in general, and XML::Writer in particular. Well, you are working with a Perl interface, so it's not really too off-topic. On the other hand, the content of

Re: "" and "" in perl/tk

2004-02-03 Thread R. Joseph Newton
Prabu Subroto wrote: > Dear my friends... > > Anybody would be so kind telling me what is similar in > perl/tk to arrange the location of a form written in > perl/tk? I want a nice look for my perl/tk > application. > Somewhat like this below: > 1. Name : > 2. Address : > 3. Telephone :

RE: Program to reformat Perl code?

2004-02-03 Thread Tim Johnson
Look for PerlTidy. -Original Message- From: John McKown [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 03, 2004 6:28 PM To: Perl Beginners Mailing List Subject: Program to reformat Perl code? I have some fairly ugly Perl code which I generated sort of ad-hoc from a "file descripto

RE: Program to reformat Perl code?

2004-02-03 Thread Toby Stuart
> -Original Message- > From: John McKown [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 04, 2004 1:28 PM > To: Perl Beginners Mailing List > Subject: Program to reformat Perl code? > > > I have some fairly ugly Perl code which I generated sort of > ad-hoc from a > "file descrip

Program to reformat Perl code?

2004-02-03 Thread John McKown
I have some fairly ugly Perl code which I generated sort of ad-hoc from a "file descriptor" file. I.e. I wrote a program which wrote a program. The C language has a prettyfier to restructure the C code into something easier to read. Is there a similar program for Perl? -- Maranatha! John McKow

XML parse - hash of hashes

2004-02-03 Thread David Byrne
Greetings, I am fairly new to Perl and to XML and I’m trying to (1) parse a XML document (snippet attached), (2) update specified data using a hash of hashes parsed from another non-XML document (not shown), and then (3) write the updated data using the XML format of the original file in #1. Usin

what is a pseudohash

2004-02-03 Thread Michael C. Davis
Hi all, The CPAN documentation for Apache::Reload refers to "pseudohashes". What is a pseudohash? Does anyone know what they could be referring to? Here's the section that uses the term: [..] "The short summary of this is: Don't use psuedohashes. Use an array with constant indexes. Its faste

Re: splitting / unpacking line into array

2004-02-03 Thread Wiggins d'Anconia
John McKown wrote: On Mon, 2 Feb 2004, Wiggins d Anconia wrote: Sounds pretty good to me. One concern, do the sub record types always have the same number of fields? Using your array to unpack into may turn into a maintenance nightmare with respect to indexing into it to get values if the recor

Re: Default VAriable

2004-02-03 Thread John McKown
On Tue, 3 Feb 2004, r huber wrote: > Greeting: > > When I execute the following: > > <>; > print; > > I get the error message "Use of uninitialized value in > print" > > but when I exectue: > > while (<>) { > print; > } > > I get what I type in echoed back to my screen. > > Why does the f

Re: script problem

2004-02-03 Thread Eternius
Leon wrote: Hi everyone, I am created this script to send e-mails (see below). I get this error when I try to run it: Number found where operator expected at C:\scriptz\test\NEWSCR~1.CGI line 15, ne ar "The IP address for the interface that caused the event, or "0" (Might be a runaway multi-li

Re: What is this piesce of code doing ?

2004-02-03 Thread Eternius
Nilay Puri wrote: Hi All, I have samll piece of code in which a subroutine is calles in unusual way . #/usr/local/bin/perl BEGIN { $ENV{ORACLE_HOME} = '/home/oracle/app/oracle/product/8.0.5'; } my $VENTURA_BASEDIR = '/home/www/highered/mdb'; my $FTP_PATH = 'ftp://ftp.prenhall.com/incomin

Re: Help with files

2004-02-03 Thread Marcelo
found the sollution, thanks for all the comments. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Help with files

2004-02-03 Thread Owen
On Tue, 3 Feb 2004 11:06:08 -0300 "Marcelo" <[EMAIL PROTECTED]> wrote: > Hi everyone, need help with two things; > > how do you find out if a line is duplicated in a file, and delete it if so. > > how do you delete a line if it has more than x number of characters. You probably need to define

Re: Regarding Text Widget in Perl/Tk

2004-02-03 Thread wolf blaum
For Quality purpouses, zentara 's mail on Saturday 31 January 2004 17:23 may have been monitored or recorded as: > > It's hard to say without showing us your script. well, the called script (not the gui) is bout 500 lines... > Try putting a "TK::after in the event loop to set the timing. That

Re: Help with files

2004-02-03 Thread James Edward Gray II
(redirected to Perl Beginners by James) Begin forwarded message: From: "Marcelo" <[EMAIL PROTECTED]> Date: February 3, 2004 1:56:20 PM CST To: "James Edward Gray II" <[EMAIL PROTECTED]> Subject: Re: Help with files Found the way to delete duplicates on an array (using hash keys), but the other p

RE: script problem

2004-02-03 Thread Dan Muey
> Hi everyone, Howdy. > > I am created this script to send e-mails (see below). > I get this error when I try to run it: > use strict; use warnings; > Number found where operator expected at > C:\scriptz\test\NEWSCR~1.CGI line 15, ne ar "The IP address > for the interface that caused the

RE: script problem

2004-02-03 Thread Paul Kraus
> event, or "0" if unavailable is: $ARGV[8] Escape the \"0\" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Fw: Help with files

2004-02-03 Thread Marcelo
Found the way to delete duplicates on an array (using hash keys), but the other problem is: if I have linse on a file that say: username:password sometx:uilokj how do i delete the lines that don't have, say, 6 letters, followed by a : and then another 6 letters. tried this re, but it won't

Default VAriable

2004-02-03 Thread r huber
Greeting: When I execute the following: <>; print; I get the error message "Use of uninitialized value in print" but when I exectue: while (<>) { print; } I get what I type in echoed back to my screen. Why does the first snippet of code get an error message and the second not? Thanks, rj

Re: [PBML] script problem

2004-02-03 Thread Leon
I figured out my problem. Sorry for the spam. Thx again, Leon __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

script problem

2004-02-03 Thread Leon
Hi everyone, I am created this script to send e-mails (see below). I get this error when I try to run it: Number found where operator expected at C:\scriptz\test\NEWSCR~1.CGI line 15, ne ar "The IP address for the interface that caused the event, or "0" (Might be a runaway multi-line "" string

RE: comparing array value...

2004-02-03 Thread Charles K. Clarkson
Singh, Ajit p <[EMAIL PROTECTED]> wrote: : : Hello there, : : Could somebody let me know how do I compare the : contents of an array that I have. To be specific, : my array contains something like below and I need : to compare whether the string : "interface ATM2/0.10 multipoint" exists in my : a

RE: WinXP copy-paste, was RE: A little help please?

2004-02-03 Thread Guay Jean-Sébastien
> Not quite. There seems to be at least one extra step. With XP, you have to > call up a menu and select 'mark' before selecting. I can't recall at the > moment whether you have to do menu selctions to paste at the insertion point. > In 2K, you can select text by dragging. If there is text sele

Re: Help with files

2004-02-03 Thread James Edward Gray II
On Feb 3, 2004, at 1:06 PM, Marcelo wrote: Hi everyone, need help with two things; how do you find out if a line is duplicated in a file, and delete it if so. how do you delete a line if it has more than x number of characters. What have you tried? Post some code, show us where you are stuck a

Help with files

2004-02-03 Thread Marcelo
Hi everyone, need help with two things; how do you find out if a line is duplicated in a file, and delete it if so. how do you delete a line if it has more than x number of characters. Thanks a lot in advance.

Help with files

2004-02-03 Thread Marcelo
Hi everyone, need help with two things; how do you find out if a line is duplicated in a file, and delete it if so. how do you delete a line if it has more than x number of characters. Thanks a lot in advance.

Re: comparing array value...

2004-02-03 Thread James Edward Gray II
On Feb 3, 2004, at 7:59 AM, Singh, Ajit p wrote: Hello there, could somebody let me know how do i compare the contents of an array that I have... To be specific. my array contains something like below and i need to compare whether the string "interface ATM2/0.10 multipoint" exists in my array.

comparing array value...

2004-02-03 Thread Singh, Ajit p
Hello there, could somebody let me know how do i compare the contents of an array that I have... To be specific. my array contains something like below and i need to compare whether the string "interface ATM2/0.10 multipoint" exists in my array. --

Re: Need help sorting by specific fields in file.

2004-02-03 Thread Rob Dixon
R. Joseph Newton wrote: > > "Dennis G. Wicks" wrote: > > > Greetings; > > > > I have a file that I need to sort and currently I am just > > sorting it by > > > > @datalist = sort(@datalist); > > Try this: > > > @articles = sort {substr($a, 6) + 0 <=> substr($b, 6) + 0} > > @files; > > >

Re: Error: Use of uninitialized value in print

2004-02-03 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (R Huber) writes: >Why does > ><>; >print; > >give the error "Use of uninitialized value in print" > >and > >while( <> ) { >print; >} > >not give that error You've assumed that: <>; is short for: $_ = <>; whereas this is only t

RE: Timing out without alarm function

2004-02-03 Thread Sam Masiello
Thank you very much, Daniel! --Sam Daniel Staal wrote: > --As off Tuesday, February 3, 2004 10:09 AM -0700, Sam Masiello is > alleged to have said: > >> I have a script where I am sending some data over a socket, but after >> X seconds I want the operation to time out. I am currently using >

RE: :Writer beginner problems

2004-02-03 Thread KEVIN ZEMBOWER
Thank you, Rob and Joel. You're absolutely right, I didn't understand XML very well, and didn't recognize that I needed to put the individual tags inside a single Root Tag. Thanks, again, for your quick and accurate assistance. -Kevin >>> "Hanson, Rob" <[EMAIL PROTECTED]> 02/03/04 12:46PM >>> >

Re: Timing out without alarm function

2004-02-03 Thread Daniel Staal
--As off Tuesday, February 3, 2004 10:09 AM -0700, Sam Masiello is alleged to have said: I have a script where I am sending some data over a socket, but after X seconds I want the operation to time out. I am currently using alarm to enforce the timeout, but I don't want the script to die. I wan

How Am I?

2004-02-03 Thread Rob Dixon
Hi Dennis. I'm just feeling a little drab after days of legal-speak. OTOH I got a very positive mail from Heather, who seems to be far more spritely than in previous days. As I've said before, I'm trying to sort out my home page so as to show some photos of my three girls. I'm quite proud of my

RE: :Writer beginner problems

2004-02-03 Thread Hanson, Rob
> > PIP 189165 > Hello, world! > ... > Attempt to insert start tag after close of document > element at ./test.pl line 11 A rule of XML is that there MAY ONLY BE ONE ROOT ELEMENT. You have two. You need to put and inside a single element. The following would be well-formed XML. PIP 1891

XML::Writer beginner problems

2004-02-03 Thread KEVIN ZEMBOWER
Hope it's okay to write to this group regarding beginner problems with XML::Writer. I'm a beginner both to XML in general, and XML::Writer in particular. I'm trying to run this program: #! /usr/bin/perl use XML::Writer; my $writer = new XML::Writer(DATA_MODE => 1,

Error: Use of uninitialized value in print

2004-02-03 Thread r huber
Why does <>; print; give the error "Use of uninitialized value in print" and while( <> ) { print; } not give that error or any other for that matter (and I do realize the infinite loop aspect of the while loop) Thanks, rj __ Do you Yahoo!? Yahoo! SiteBuilder -

Re: What is this piesce of code doing ?

2004-02-03 Thread Andrew Gaffney
Nilay Puri, Noida wrote: Hi All, I have samll piece of code in which a subroutine is calles in unusual way . #/usr/local/bin/perl BEGIN { $ENV{ORACLE_HOME} = '/home/oracle/app/oracle/product/8.0.5'; } my $VENTURA_BASEDIR = '/home/www/highered/mdb'; my $FTP_PATH = 'ftp://ftp.prenhall.com/

What is this piesce of code doing ?

2004-02-03 Thread Nilay Puri, Noida
Hi All, I have samll piece of code in which a subroutine is calles in unusual way . #/usr/local/bin/perl BEGIN { $ENV{ORACLE_HOME} = '/home/oracle/app/oracle/product/8.0.5'; } my $VENTURA_BASEDIR = '/home/www/highered/mdb'; my $FTP_PATH = 'ftp://ftp.prenhall.com/incoming/booksellers'; u

RE: Different results Command Line/CGI

2004-02-03 Thread Dan Muey
> I have this script stolen and modified from somewhere Stealling is bad! :) > > #!/usr/bin/perl -w > use strict; > use File::Find; > print "Content-type: text/html\n\n"; > > my $u=shift; > my $sizes = 0; > # replace this with your absolute path > my $path = "/home/$u/"; > > find (sub {$si

Timing out without alarm function

2004-02-03 Thread Sam Masiello
Hi all! I am new to the list, and have a question which I hope isn't too difficult to answer. I have a script where I am sending some data over a socket, but after X seconds I want the operation to time out. I am currently using alarm to enforce the timeout, but I don't want the script to die.

Re: using grep in perl

2004-02-03 Thread Jeff 'japhy' Pinyan
On Feb 3, Cy Kurtz said: >I'm trying to write a little program to take all of the fun out of the >daily jumble. > >My plan is to get a sequence of letters from the user, move the letters >around and bounce the resulting sequence of letters off of a spell check >dictionary until the program generat

Re: using grep in perl

2004-02-03 Thread Rob Dixon
Cy Kurtz wrote: > > I'm trying to write a little program to take all of the fun out of the > daily jumble. > > My plan is to get a sequence of letters from the user, move the letters > around and bounce the resulting sequence of letters off of a spell check > dictionary until the program generates

Re: using grep in perl

2004-02-03 Thread Andrew Gaffney
Cy Kurtz wrote: I'm trying to write a little program to take all of the fun out of the daily jumble. My plan is to get a sequence of letters from the user, move the letters around and bounce the resulting sequence of letters off of a spell check dictionary until the program generates an English wor

using grep in perl

2004-02-03 Thread Cy Kurtz
I'm trying to write a little program to take all of the fun out of the daily jumble. My plan is to get a sequence of letters from the user, move the letters around and bounce the resulting sequence of letters off of a spell check dictionary until the program generates an English word. When I call

"" and "" in perl/tk

2004-02-03 Thread Prabu Subroto
Dear my friends... Anybody would be so kind telling me what is similar in perl/tk to arrange the location of a form written in perl/tk? I want a nice look for my perl/tk application. Somewhat like this below: 1. Name : 2. Address : 3. Telephone : I have made the main menu of my applicat

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

2004-02-03 Thread Eternius
Nilay Puri wrote: No takers ?? :( 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. M