Re: Data through the parallel port

2001-12-19 Thread nafiseh saberi
hi. i work with database under oracle or postgres with perl. i send/receive data with define port for this work. e.g...port 5432 is sutable for this work. I configure it in one madule of my program (config) and with programming I connect.. I do these work only with perl and programming. __

Re: Macintosh

2001-12-19 Thread Omi
Hello Pc; If you are talking about: open FILEHANDLE, 'path/to/file'; someting like this, on MacPerl you have to specify the file path like this: open FILEHANDLE, 'volume name:folder name:file'; or open FILEHANDLE, ':folder:file'; #only if the 'folder' is in the same folder as the script exi

Re: Data through the parallel port

2001-12-19 Thread Stanislav Zahariev
- Original Message - From: "nafiseh saberi" <[EMAIL PROTECTED]> To: "Stanislav Zahariev" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, December 20, 2001 9:32 AM Subject: Re: Data through the parallel port > hi. > in last month , i send data through port but not with laser. >

Re: global matching

2001-12-19 Thread John W. Krahn
Bram Heyns wrote: > > I have a rather simple question, but I can't figure it out! > For example if I have a string like "" and I want to match > every "aa" in there, how should I do this? > So I want a match on position 0-1,1-2,2-3. > If I use if(/aa/g){} statement, it only finds one, and if

Re: Data through the parallel port

2001-12-19 Thread nafiseh saberi
hi. in last month , i send data through port but not with laser. i am working in ISP and send and receive data through port and routhr. Best regards Nafiseh Saberi Iran www.shirazinfocenter.com www.iraninfocenter.net

HTML::Treebuilder

2001-12-19 Thread McCollum, Frank
I do not understand what is meant by 'depth' in this module (i've read the accompanying documentation, but I didn't follow it well). Does anyone know where a good description is? I basically want to go to a website and figure out what the 'depth' is of a given table on that site, so that I can

Re: Data through the parallel port

2001-12-19 Thread nafiseh saberi
hi. it is a nice project. that 's so great. if perl have this power for this work , it is very powerful. but I didn't work in this situation so far. please ,if your finish successfuly... announce us. if i find some thing that help for you ,be sure that ,I announce you. thx for your time.

Re: Data through the parallel port

2001-12-19 Thread Stanislav Zahariev
Well, I'm just doing some test on my local machine for now. But If I can do that I could make non cable connection between 2 PCs. I have some knowledge of electronics. They'll translate date through a laser, which would send the data to the PC. So any Ideas ??

Re: trouble with curly brackets

2001-12-19 Thread John W. Krahn
Gary Hawkins wrote: > > > > That being said, you should never, never try to parse CGI form > > data by hand. > > What do you use John. You are attributing a statement to me that was actually written by Curtis Poe. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROT

Re: Data through the parallel port

2001-12-19 Thread nafiseh saberi
hi. can you describe more about your work that want to do ? Best regards Nafiseh Saberi Iran www.shirazinfocenter.com www.iraninfocenter.net www.electronegar.com www.sorna.net Some things are

Data through the parallel port

2001-12-19 Thread Stanislav Zahariev
Hi, I was just wondering, can I send data through the parallel port using perl? And If yes, how ? With some kind of a module ? And where can I read more about it? Thanks for any help provided :))

RE: extract uptime for linux box w/perl

2001-12-19 Thread Jim Conner
At 02:01 12.20.2001 -0500, Jim Conner wrote: >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA1 > >At 00:26 12.20.2001 -0500, Steven Hetland wrote: > > > -Original Message- > > > > > > right now i do > > > > > > w | head -1 > > > > > > and get what's below my signature. I want to clean that

RE: extract uptime for linux box w/perl

2001-12-19 Thread Jim Conner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 At 00:26 12.20.2001 -0500, Steven Hetland wrote: > > -Original Message- > > > > right now i do > > > > w | head -1 > > > > and get what's below my signature. I want to clean that up, cutting it > > after the # of users, so that everything aft

RE: trouble with curly brackets

2001-12-19 Thread Jeff 'japhy' Pinyan
On Dec 19, Gary Hawkins said: >> > That being said, you should never, never try to parse CGI form >> data by hand. > >What do you use John. If not the *standard* CGI.pm module, use one of the kid-testing, mother-approved CGI::* modules on CPAN, like CGI_Lite (or CGI::Lite). -- Jeff "japhy"

Re: Macintosh

2001-12-19 Thread Shawn
Hey PC, Need a bit more to go on. Assuming that you mean Perl for 'program', what 'indicated file'? Shawn > Hi, > > On the Macintosh, I cannot get the program to open the indicated file for > processing. Please help. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

Macintosh

2001-12-19 Thread Purshottam Chandak
Hi, On the Macintosh, I cannot get the program to open the indicated file for processing. Please help. Pc _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Learning Perl, chapter 8: pattern_test

2001-12-19 Thread Leon
- Original Message - From: "Michael Fowler" <[EMAIL PROTECTED]> To: "Egor Brandt" <[EMAIL PROTECTED]> > On Wed, Dec 19, 2001 at 10:14:00PM +0100, Egor Brandt wrote: > > #!/usr/bin/perl -w > > while ( < i am fred flintstone >) { > > The text between the angle brackets is not what you're

Re: Learning Perl, chapter 8: pattern_test

2001-12-19 Thread Shawn
> No, that's some mutation by the original poster. We never suggest > that, or even suggest it might work. I don't know why people end up > doing that occasionally... it baffles me. I suppose it's like an > experienced carpenter watching an apprentice beat a nail in with a > screwdriver. "I wou

Re: extract uptime for linux box w/perl

2001-12-19 Thread Jim Conner
At 23:02 12.19.2001 -0500, KeN ClarK wrote: >right now i do > >w | head -1 > >and get what's below my signature. I want to clean that up, cutting it >after the # of users, so that everything after AND including the third >comma is removed from that line. Then take that and add it to my signature >

RE: trouble with curly brackets

2001-12-19 Thread Gary Hawkins
> > That being said, you should never, never try to parse CGI form > data by hand. What do you use John. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: re-convert

2001-12-19 Thread Curtis Poe
--- Connie Chan <[EMAIL PROTECTED]> wrote: > Since we know this : $string =~ s/([a-fA-F0-9][a-fA-F0-9])/pack ("C", hex($1))/eg; > > is a statement which can converting back the "real string" from > a form field, but, could anybody tell how to convert the "real string" > to the "long long" string

extract uptime for linux box w/perl

2001-12-19 Thread KeN ClarK
right now i do w | head -1 and get what's below my signature. I want to clean that up, cutting it after the # of users, so that everything after AND including the third comma is removed from that line. Then take that and add it to my signature script. i can either send it to a new file and c

Re: Learning Perl, chapter 8: pattern_test

2001-12-19 Thread Leon
Normally when I hit reply, I will see the greater sign > on the original post, but this time it is not there and I do not know how to set up the outlook express. I will try to experiment with the outlook express later. Sorry about that. Coming to the point, put qutoes on 'i am fred flintstone

Re: HTML Cleaner-Upper Module

2001-12-19 Thread Peter Scott
At 10:07 AM 12/19/01 -0800, Agustin Rivera wrote: >I could of swore I saw a message about some Perl module that outputs >"pretty", properly indented HTML. I can't find the message in my email >client, so if anyone could help me, I'd be very grateful. Sounds like you're thinking of CGI::Pretty.

re-convert

2001-12-19 Thread Connie Chan
Since we know this : $string =~ s/([a-fA-F0-9][a-fA-F0-9])/pack ("C", hex($1))/eg; is a statement which can converting back the "real string" from a form field, but, could anybody tell how to convert the "real string" to the "long long" string ?? Besides, anybody can tell what is the exactly me

Re: Learning Perl, chapter 8: pattern_test

2001-12-19 Thread Randal L. Schwartz
> "Michael" == Michael Fowler <[EMAIL PROTECTED]> writes: Michael> I was referring to what the original text is trying to do, Michael> not what his variation parses into. Are you saying Learning Michael> Perl is using the glob operator to get a string to iterate Michael> over? I wouldn't th

Re: global matching

2001-12-19 Thread Kristina Nairn
Try using a positive lookahead assertion: while ( /a(?=a)/g){} Let me know if it works. ;-) - Original Message - From: "Bram Heyns" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 2:37 PM Subject: global matching I have a rather simple question, but I c

Re: Learning Perl, chapter 8: pattern_test

2001-12-19 Thread Michael Fowler
On Wed, Dec 19, 2001 at 03:25:15PM -0800, John W. Krahn wrote: > Michael Fowler wrote: > > > > On Wed, Dec 19, 2001 at 10:14:00PM +0100, Egor Brandt wrote: > > > #!/usr/bin/perl -w > > > while ( < i am fred flintstone >) { > > > > The text between the angle brackets is not what you're matchi

RE: Can I change built-in @INC in a perl installation

2001-12-19 Thread Song, Weidong (Weidong)
Frank: Thanks for your quick response. I think this is the spirit of Perl. Weidong > -- > From: McCollum, Frank[SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, December 19, 2001 1:17 PM > To: Song, Weidong (Weidong); [EMAIL PROTECTED] > Subject: RE: Can I change built

global matching

2001-12-19 Thread Bram Heyns
I have a rather simple question, but I can't figure it out! For example if I have a string like "" and I want to match every "aa" in there, how should I do this? So I want a match on position 0-1,1-2,2-3. If I use if(/aa/g){} statement, it only finds one, and if I use while(/aa/g){} then it

Re: declarations within an if statement.

2001-12-19 Thread Michael R. Wolf
Ben Curran <[EMAIL PROTECTED]> writes: > Trying to alter the value of $testfile depending on how many arguments are > given, using the following: > > if (@ARGV == 2) { > chdir $ARGV[0]; > my $testfile = $ARGV[1]; > } > else { > my $testfile = $ARGV[0]; > } Help yourself and your readers out. U

Re: Variables not being deleted from memory.. I think.

2001-12-19 Thread Michael Fowler
On Thu, Dec 20, 2001 at 09:31:20AM +1030, Daniel Falkenberg wrote: > Now the problem is is that the code never updates. Ie if I happed to add > a * in front username with a GID of 45 in /etc/passwd then then code below > won't read from it and remove it from my hash? If I restart the daemon > th

Re: Learning Perl, chapter 8: pattern_test

2001-12-19 Thread John W. Krahn
Michael Fowler wrote: > > On Wed, Dec 19, 2001 at 10:14:00PM +0100, Egor Brandt wrote: > > #!/usr/bin/perl -w > > while ( < i am fred flintstone >) { > > The text between the angle brackets is not what you're matching against; > it's either a filehandle that you're reading from, or a globbin

Re: installation under aix

2001-12-19 Thread Elaine -HFB- Ashton
Marc Grober [[EMAIL PROTECTED]] quoth: *>I have installed perl 5.6.1 under aix via an lpp from the Bull *>distribution. The config.sh file indicates that CC='cc_r' but *>there is no such file. If I create a link from /usr/local/bin/gcc *>the make runs but it bombs with compiler errors. Does anyon

Variables not being deleted from memory.. I think.

2001-12-19 Thread Daniel Falkenberg
Hi list, I have a unique problem here where I have a daemon perl script running. The code below sits in a while loop in my Perl daemon. If the $status ever equals a 6 then the chunk of code below is executed. Now the problem is is that the code never updates. Ie if I happed to add a * in front

Re: HTML Cleaner-Upper Module

2001-12-19 Thread John W. Krahn
Brent Michalski wrote: > > Give http://perltidy.sourceforge.net a shot, it is very good. perltidy won't help him format HTML. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: trouble with curly brackets

2001-12-19 Thread John W. Krahn
Curtis Poe wrote: > > There are a number of problems with your code snippet, but syntax is not one of >them. If it is > indented properly to show scope, you can quickly see that the curly brackets are >fine: > > sub Parse > { > my $buffer; > if($ENV{REQUEST_METHOD}eq'GET') > { >

RE: :Text Question

2001-12-19 Thread Pankaj Warade
Title: Glacier Can anybody know how to use the GD::Text module with GD::Graph ?? If so, Please send the example...   Thanks Pankaj -Original Message-From: Pankaj Warade [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 19, 2001 4:50 PMTo: BeginnersSubject: GD::Text Questio

Re: directing output

2001-12-19 Thread John W. Krahn
Aaron wrote: > > I have the following code that I am using to try and get a better > understanding of how to read from a program and then process the output in > any way needed: > > #!/usr/bin/perl -w > > open(IN, 'who | '); > while() { >$MBody .= $_; > } > > So this section gives me the

installation under aix

2001-12-19 Thread Marc Grober
I have installed perl 5.6.1 under aix via an lpp from the Bull distribution. The config.sh file indicates that CC='cc_r' but there is no such file. If I create a link from /usr/local/bin/gcc the make runs but it bombs with compiler errors. Does anyone know: a) if aix requires perl to be compiled

GD::Text Question

2001-12-19 Thread Pankaj Warade
Title: Glacier   -Original Message-From: Pankaj Warade [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 19, 2001 4:07 PMTo: BeginnersSubject: FW: Question   -Original Message-From: Pankaj Warade [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 19, 2001 3:56 PMTo: Beginn

Help with text files.

2001-12-19 Thread Michael Eggleton
Hello All, I have two files one contains entries that need to be placed in the other. With some parameters around it. 1. I have to check and make sure the entries are not already there (I did that using grep) 2. 3 of the lines I have to add need to be added in the middle of the file. (I do

Re: which mailing list?

2001-12-19 Thread Elaine -HFB- Ashton
Marc Grober [[EMAIL PROTECTED]] quoth: *>I was using CPAN on aix433 with perl5.6 and was installing MD5 when I *>got this error *> *>make:cc_r: Command not found *>make: *** [MD5.o] Error 127 That's not really enough information to go on. You should probably check your path to make sure your c c

Re: Package declaration problem

2001-12-19 Thread Michael Fowler
On Wed, Dec 19, 2001 at 03:33:59PM -0500, Paul Kincaid wrote: > #!/usr/bin/perl -w > > # Program for logging into Foundry and Cisco switches/routers > # and backing up specific information > > use strict; > use Net::Telnet; [snip] > sub start { > > package Start; > my ($t, @output,

Re: Learning Perl, chapter 8: pattern_test

2001-12-19 Thread Michael Fowler
On Wed, Dec 19, 2001 at 10:14:00PM +0100, Egor Brandt wrote: > #!/usr/bin/perl -w > while ( < i am fred flintstone >) { The text between the angle brackets is not what you're matching against; it's either a filehandle that you're reading from, or a globbing pattern to match files against in t

Re: perldoc under HPUX

2001-12-19 Thread Elaine -HFB- Ashton
Michael Fowler [[EMAIL PROTECTED]] quoth: *>On Wed, Dec 19, 2001 at 10:23:40AM -0500, Messier, Jean-Francois wrote: *>> *>> This might seem like a beginner's question, but I saw several *>> messages ending with something about perldoc. I tried this command under *>> HP-UX v11, and first it di

FW: Question

2001-12-19 Thread Pankaj Warade
Title: Glacier   -Original Message-From: Pankaj Warade [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 19, 2001 3:56 PMTo: BeginnersSubject: Question I am using the GD:Graph for plotting the graphs. These graphs are generated on the fly and displayed on a wab browser. I need to p

Learning Perl, chapter 8: pattern_test

2001-12-19 Thread Egor Brandt
HI! Studying 'Learning Perl, 3rd edition' I was stopped, suddenly, by C. 8's Exercise 1, using the pattern_test program. the following works fine: #!/usr/bin/perl -w while (< alfred >) { if (/fred/) { print "matched: |$`<$&>$'|\n"; } else { print "no match.\n"; } } but when I try the followi

Question

2001-12-19 Thread Pankaj Warade
Title: Glacier I am using the GD:Graph for plotting the graphs. These graphs are generated on the fly and displayed on a wab browser. I need to put some explaintion of the graphs beside it. Can anybody know how to put the text beside the graph. I am not saving the graph and displaying it. Pl

Re: Package declaration problem

2001-12-19 Thread Paul Kincaid
One little change - please just look at the first part of the script I sent in (see below), I just realized how royally screwed up the rest of the script is right now, and I should be embarassed at letting it get out into the public > > #!/usr/bin/perl -w > > # Program for logging into Foun

Package declaration problem

2001-12-19 Thread Paul Kincaid
I've got a small script that is going into a much larger script that is killing me as to why it is not working When I try and execute it I get: [paul@kenny backup]$ perl test2.pl Name "Start::skip" used only once: possible typo at test2.pl line 52. Can't call method "waitfor" on an undefined

Re: Replace

2001-12-19 Thread Shawn
I think this is what you are asking for... $string=s/(\w+)_(NN|IN|AT)/$1/g; $string=''.$string.''; Shawn - Original Message - From: "RNOORY" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 1:32 PM Subject: Replace Help to write the replace part of a RE.

Re: Form to Flatfile

2001-12-19 Thread Brent Michalski
I have solved this in the past by replacing the carriage-returns with tags... do a s/\015?\012//g; on each line BEFORE you write it to the flat-file hth, brent "

Re: HTML Cleaner-Upper Module

2001-12-19 Thread Brent Michalski
Give http://perltidy.sourceforge.net a shot, it is very good. brent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: the smtp program

2001-12-19 Thread Scott Lutz
Here is a great place to find info an almost every module known to (Perl) man : http://www.perldoc.com Scott Lutz technical support Pacific Online http://www.paconline.net -Original Message- From: Naeemah Small [mailto:[EMAIL PROTECTED]] Sent: December 19, 2001 11:29 AM To: [EMAIL PROT

RE: Randomizing lines in a file: problems with hashes

2001-12-19 Thread KEVIN ZEMBOWER
Thank you, David, for giving me a fish, and Bob, for teaching me to fish. It works like a charm. Thanks, again. -Kevin Zembower >>> Bob Showalter <[EMAIL PROTECTED]> 12/19/01 11:21AM >>> > -Original Message- > From: KEVIN ZEMBOWER [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December

the smtp program

2001-12-19 Thread Naeemah Small
Does any know the smtp program how to send email over internet through smtp -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Replace

2001-12-19 Thread RNOORY
Help to write the replace part of a RE. MySearch is =\w+_NN \w+_IN \w+_AT \w+_NN; My replace = the same string (without _NN, _IN,_AT) and enclosed in Result = control of the car Thanks

Re: File::Basename fileparse adding current path

2001-12-19 Thread Michael Fowler
On Thu, Dec 13, 2001 at 06:13:05PM -0500, Thomas A. Lowery wrote: [snip] > "You are guaranteed that if you concatenate path, name, > and suffix together in that order, the result will > denote the same file as the input file specification." [snip] >

RE: Can I change built-in @INC in a perl installation

2001-12-19 Thread McCollum, Frank
I think I follow you. I want any user on a network to use the same set of Frameworks, so I use this at the top of my perl script.Here, everyone has the same server mapped to their R: drive, so we store many Frameworks and packages here. #! c:/perl/bin/perl -I r:/usr/rer/prod/current/FRAMEW~1

Re: Remove a line

2001-12-19 Thread Michael Fowler
On Wed, Dec 19, 2001 at 03:40:21PM +0200, Prasanthi Tenneti wrote: > how to remove a line from a file? See perldoc -q 'line in a file', or the second question at http://www.perldoc.com/perl5.6.1/pod/perlfaq5.html Michael -- Administrator www.shoebox.net Programmer, System A

Re: Global Symbols

2001-12-19 Thread Agustin Rivera
I can't think of how much of my life I've wasted because I didn't know about "splain". Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com - Original Message - From: "Michael Fowler" <[EMAIL PROTECTED]> To: "Chris Zampese" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: We

Can I change built-in @INC in a perl installation

2001-12-19 Thread Song, Weidong (Weidong)
> After perl is installed, the executable has the builtin @INC info. If I > change the installation diretory of the already installed perl, can I do > something simple to make @INC pointing to the new perl diretory? Or I > have to do an reinstall? This is useful if I want to install perl on man

Re: Quick regex. Q.

2001-12-19 Thread Michael Fowler
On Wed, Dec 19, 2001 at 04:01:07PM +1030, Daniel Falkenberg wrote: > next if $username =~ /^ruby/; > > will that strip and go to the next if statment if $username = ruby? It won't strip anything, and it matches on a username that starts with 'ruby', not if it equals 'ruby'. Use eq for string eq

Re: Global Symbols

2001-12-19 Thread Michael Fowler
On Thu, Dec 20, 2001 at 04:38:27AM +1300, Chris Zampese wrote: > Global symbol "$whatever" requires explicit package name Error messages are documented in perldoc perldiag. You can also pipe your error to the splain program (provided you have it) so that you don't have to search through

Re: perldoc under HPUX

2001-12-19 Thread Michael Fowler
On Wed, Dec 19, 2001 at 10:23:40AM -0500, Messier, Jean-Francois wrote: > > This might seem like a beginner's question, but I saw several > messages ending with something about perldoc. I tried this command under > HP-UX v11, and first it did not work. I found where the program actually > w

Re: Optimizations.

2001-12-19 Thread kurt
>I want to get a consensus here. Do you think one liners are faster than >more extensive programs. Discuss. Optimized for what? Speed? Space? Future maintenance? In general, if it's code someone is going to have to maintain, clarity is more important than character count. (It's also gener

RE: Remove a line

2001-12-19 Thread Prasanthi Tenneti
Hi, you are correct . I have one file like this [praveen@calvin] rpm1.rpm rpm2.rpm rpm3.rpm [praveen@calvin] rpm3.rpm qwe.rpm [praveen@calvin] I want to remove [praveen@calvin]. evey time [praveen@calvin]cahanges ,It depends on user. so I want to remove the line which starts with '['and ends wi

Re: trouble with curly brackets

2001-12-19 Thread Curtis Poe
--- Curtis Poe <[EMAIL PROTECTED]> wrote: > 7. You should be using strict (not everyone does, but code like this tells me the >programmer > needs it). Aack! I rereading the code, I saw that the code is strict compliant and the programmer may very well be using that. The last item was kind of

Re: trouble with curly brackets

2001-12-19 Thread Curtis Poe
--- Chris Zampese <[EMAIL PROTECTED]> wrote: > When I execute the folowing script (to insert form input into $In), I get an error >message > saying > > unmatched right curly bracket line 60 at end of line > syntax error near "}" Line 60 > > But I have been through the code over and ove

HTML Cleaner-Upper Module

2001-12-19 Thread Agustin Rivera
I could of swore I saw a message about some Perl module that outputs "pretty", properly indented HTML. I can't find the message in my email client, so if anyone could help me, I'd be very grateful. Thanks, Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com -- To unsubscribe, e-

which mailing list?

2001-12-19 Thread Marc Grober
I was using CPAN on aix433 with perl5.6 and was installing MD5 when I got this error make:cc_r: Command not found make: *** [MD5.o] Error 127 To which of the dozens of perl lists should I post to find out what happened? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

trouble with curly brackets

2001-12-19 Thread Chris Zampese
When I execute the folowing script (to insert form input into $In), I get an error message saying unmatched right curly bracket line 60 at end of line syntax error near "}" Line 60 But I have been through the code over and over, and as far as I can see, all the brackets match up??

RE: Optimizations.

2001-12-19 Thread Jeff 'japhy' Pinyan
On Dec 19, Ryan Guy said: >kept doing that for a whole program.) Anyways what I am getting at is that >the compiler optimizer works in tune with good coding practicing. It trips >and falls when you try to cram all that shit on one-line (with a few >exceptions). I always hear all this hype abou

RE: Optimizations.

2001-12-19 Thread Ryan Guy
Actually there Sparky, your intuition has failed you again. Taken into consideration the amount of time wasted on brainstorming and the bad coding practices put into play in one liners and (if we are thinking here. Think. Think.) the way a program can be condensed into a series of one liners (af

Re: check syntax

2001-12-19 Thread Curtis Poe
--- Antti Eskola <[EMAIL PROTECTED]> wrote: > Hi everybody. > > is the some wrong in this syntax, i have a mystical, possibly a infinite > loop proble. > > if(!(("Avataanyhteys="."$lomaketaulu[1]") eq $etahallinta[$i])){for_x7();} > > > Regards, > <|- Antti Eskola -|> Your syntax is correct,

Re: directing output

2001-12-19 Thread smoot
> "Shawn" <[EMAIL PROTECTED]> said: > #!/usr/bin/perl -w > > use strict; > open(IN, 'who | '); > my @array=; > close(IN); > > open(FILE,'>file.txt') or die "Can't write file.txt: $!\n"; > print FILE @array; > close(FILE); Or the line at a time case when your input is potentially arbitrarily si

check syntax

2001-12-19 Thread Antti Eskola
Hi everybody. is the some wrong in this syntax, i have a mystical, possibly a infinite loop proble. if(!(("Avataanyhteys="."$lomaketaulu[1]") eq $etahallinta[$i])){for_x7();} Regards, <|- Antti Eskola -|> _ Join the world’s lar

Re: Calling a subroutine

2001-12-19 Thread Curtis Poe
--- Chris Zampese <[EMAIL PROTECTED]> wrote: > How do I call a subroutine in a cgi script. I thought that it was just > > subroutine_name(); > > but that does not seem to be working for me? > > You guys are great. Thanks for your help (both from answering my questions, and >from ans

Re: Optimizations.

2001-12-19 Thread Curtis Poe
--- Ryan Guy <[EMAIL PROTECTED]> wrote: > I want to get a consensus here. Do you think one liners are faster than > more extensive programs. Discuss. What, precisely, is there to discuss? Faster to execute? Faster to get work done? Faster to waste time with? One-liners are often used for a

Re: Optimizations.

2001-12-19 Thread Daniel Gardner
Wednesday, December 19, 2001, 4:38:03 PM, Ryan Guy wrote: > I want to get a consensus here. Do you think one liners are faster than > more extensive programs. Discuss. they're both perl they're both using the same interpreter they're both doing the same job if they're executing the same code,

RE: Optimizations.

2001-12-19 Thread Stef
If you take into account the amount of time you save in coding, one-liners are mostly faster. You can also add to that the time saved on future maintenance. Stef Thus spake Ryan Guy on 19-Dec-2001 : -> I want to get a consensus here. Do you think one liners are faster than -> more extensive p

Optimizations.

2001-12-19 Thread Ryan Guy
I want to get a consensus here. Do you think one liners are faster than more extensive programs. Discuss. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Calling a subroutine

2001-12-19 Thread Chris Zampese
How do I call a subroutine in a cgi script. I thought that it was just subroutine_name(); but that does not seem to be working for me? You guys are great. Thanks for your help (both from answering my questions, and from answering other peoples!) Chris

RE: declarations within an if statement.

2001-12-19 Thread Bob Showalter
> -Original Message- > From: Ben Curran [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 19, 2001 10:54 AM > To: [EMAIL PROTECTED] > Subject: declarations within an if statement. > > > Trying to alter the value of $testfile depending on how many > arguments are > given, using the

Re: testing input/loops

2001-12-19 Thread Chris Zubrzycki
wow, thanks. this is the closest to what i wanted to do first, so i'll use this. > my $response = 0; > while ( $response != 1 and $response != 2 and $response != 3 ) { > print "What would like to do?\n"; > print "1. Start a new file\n"; > prin

Re: declarations within an if statement.

2001-12-19 Thread Jenda Krynicky
From: Ben Curran <[EMAIL PROTECTED]> > Trying to alter the value of $testfile depending on how many arguments > are given, using the following: > > if (@ARGV == 2) { > chdir $ARGV[0]; > my $testfile = $ARGV[1]; > } > else { > my $testfile = $ARGV[0]; > } > > > I figured out w

RE: Randomizing lines in a file: problems with hashes

2001-12-19 Thread Bob Showalter
> -Original Message- > From: KEVIN ZEMBOWER [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 19, 2001 11:06 AM > To: [EMAIL PROTECTED] > Subject: Randomizing lines in a file: problems with hashes > > > I need to take a file of alphabetized lines (one line per record) and > randomiz

Re: Randomizing lines in a file: problems with hashes

2001-12-19 Thread David Shrewsbury
Change %randomarray = ($key => $_); to $randomarray{$key} = $_; -David On Wed, 2001-12-19 at 11:05, KEVIN ZEMBOWER wrote: > I need to take a file of alphabetized lines (one line per record) and > randomize it. I thought one way of doing this was to read in the file, > one line at a tim

Re: declarations within an if statement.

2001-12-19 Thread Curtis Poe
--- Ben Curran <[EMAIL PROTECTED]> wrote: > Trying to alter the value of $testfile depending on how many arguments are > given, using the following: > > if (@ARGV == 2) { > chdir $ARGV[0]; > my $testfile = $ARGV[1]; > } > else { > my $testfile = $ARGV[0]; > } This is syntactically correct, but s

Randomizing lines in a file: problems with hashes

2001-12-19 Thread KEVIN ZEMBOWER
I need to take a file of alphabetized lines (one line per record) and randomize it. I thought one way of doing this was to read in the file, one line at a time, generate a random number and store the line in a hash with the random number as the key. After all the lines were read in, I'd output eac

declarations within an if statement.

2001-12-19 Thread Ben Curran
Trying to alter the value of $testfile depending on how many arguments are given, using the following: if (@ARGV == 2) { chdir $ARGV[0]; my $testfile = $ARGV[1]; } else { my $testfile = $ARGV[0]; } I figured out what was wrong, i.e. I can't use my $testfile within the if, giving me : my $testf

RE: Global Symbols

2001-12-19 Thread Daryl J. Hoyt
Try $::whatever. It may be using strict -w. Daryl J. Hoyt Performance Engineer Geodesic Systems 312-832-2010 -Original Message- From: Chris Zampese [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 19, 2001 9:38 AM To: [EMAIL PR

Re: directing output

2001-12-19 Thread Shawn
Hey Aaron, I am not familiar with the 'who' command, but you can probably do this: #!/usr/bin/perl -w use strict; open(IN, 'who | '); my @array=; close(IN); open(FILE,'>file.txt') or die "Can't write file.txt: $!\n"; print FILE @array; close(FILE); exit; Shawn - Original Message -

Global Symbols

2001-12-19 Thread Chris Zampese
Hi everyone, I am running a perl script through an Apache server, and the error log is showing Global symbol "$whatever" requires explicit package name for all my variables (Globals and locals), any ideas, Thanks in advance, Chris.

RE: Some split help here please

2001-12-19 Thread Bob Showalter
> -Original Message- > From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 18, 2001 10:59 PM > To: [EMAIL PROTECTED] > Subject: Some split help here please > > > Folks, > > I have a date string as such > > Thu Dec 10 2001 > Tue Dec 8 2001 > Wed Dec 7 2001 > >

Parent Child Communication Help.

2001-12-19 Thread Ryan Guy
I was wondering what the best way for a parent and a child proccess to communicate is. I have been reading perldoc and perlipc for the past few hours and they have not been of much help. Just a couple of code snippets and a little explanation would be great. Thanks. -- To unsubscribe, e-mail:

Win32 Process's

2001-12-19 Thread Matthew Mackey
Hi, I was looking for a way to list all of the current processes in a Win2k Server with Terminal Services. I need to sort out the processes by username, PID, and process then kill certain ones. Is this feasible? Thanks for your help Matt Matt Mackey Health Business Systems Inc. (215) 442-93

directing output

2001-12-19 Thread Aaron
I have the following code that I am using to try and get a better understanding of how to read from a program and then process the output in any way needed: #!/usr/bin/perl -w open(IN, 'who | '); while() { $MBody .= $_; } So this section gives me the contents of the who command. Now, wha

perldoc under HPUX

2001-12-19 Thread Messier, Jean-Francois
This might seem like a beginner's question, but I saw several messages ending with something about perldoc. I tried this command under HP-UX v11, and first it did not work. I found where the program actually was, and retried. I then got a reply saying something linke "Superuser must not r

  1   2   >