Endless Loop

2004-07-29 Thread BOLCATO CHRIS (esm1cmb)
This may be a dumb question, but why will this loop not end when nothing is entered in STDIN? print "Enter Things:\n"; while () { print "I saw $_"; } print "The End\n"; If nothing is entered the loop continues. Output: I saw red I sa

RE: Help with "use"

2004-07-09 Thread BOLCATO CHRIS (esm1cmb)
I added 1; Inside sub foo and it didn't work, but I just added it to the end of foo.pl and it worked! I don't get it? But thanks. -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 1:49 PM To: BOLCATO CHRIS (esm1cmb); [EMAIL PROTECTE

RE: Help with "use"

2004-07-09 Thread BOLCATO CHRIS (esm1cmb)
PM To: BOLCATO CHRIS (esm1cmb); 'Wiggins d Anconia'; [EMAIL PROTECTED] Subject: RE: Help with "use" BOLCATO CHRIS (esm1cmb) wrote: > I am receiving "/home/users/me/foo.pl did not return a true value at > ./program1.pl at line 2" where line 2 is the "require

RE: Help with "use"

2004-07-09 Thread BOLCATO CHRIS (esm1cmb)
I am receiving "/home/users/me/foo.pl did not return a true value at ./program1.pl at line 2" where line 2 is the "require". Any ideas? -Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 1:24 PM To: BOLCATO CHRIS (esm1cm

Help with "use"

2004-07-09 Thread BOLCATO CHRIS (esm1cmb)
Hello all, Can "use" be used in a sub routine that is kept external? Ex. Program 1. #!/bin/perl require '/home/users/me/foo.pl'; exit; Foo.pl sub bar { use strict; use fcntl; use AnyDBM_File; }

DBM Files

2004-07-07 Thread BOLCATO CHRIS (esm1cmb)
Hello all, Which DBM modules should be used or is most common, compatible, recommended? Would this be a good choice for sharing variable data with multiple perl scripts? Kind of a shared variable database? Chris

Memory Parenthesis

2004-06-25 Thread BOLCATO CHRIS (esm1cmb)
Hello all, I am having a problem with memory parenthesis. In the following piece of code the pattern matches but the $1 $2 $3 $4 variables are null. I can tell the pattern matches because @foo has the line that matches. Any help would be greatly appreciated. @foo = grep(/^"$var",.+,.+,"(.+)","(

RE: Using regular expression as a variable.

2004-06-21 Thread BOLCATO CHRIS (esm1cmb)
Hello, >Hi, >I'm having a problem where somehow a regexp does not work and the program results in an error >when the regexp is called using a variable. >Here is my code. >1 $filename = 'This is a directory\file\sub.txt'; >2 $regex = '\\(\w+\.\w+)$'; >3 if ($filename =~ /$regex/) >4 {print $1;} e

DBM Files

2004-05-20 Thread BOLCATO CHRIS (esm1cmb)
Hello all, I am fairly new to using Perl and have some questions regarding DBM Files. One, which type is recommended DB_File, GDBM, SDBM, NDBM etc.? Is it common practice to make use of DBM files? Or should I look into some other database structure? Is it a significant performance enhancement over