RE: Learning Perl

2003-04-02 Thread Dylan Boudreau
I would suggest the Perl Black Book by Steven Holzner -Original Message- From: Ramón Chávez [mailto:[EMAIL PROTECTED] Sent: April 2, 2003 10:15 AM To: [EMAIL PROTECTED] Subject: RE: Learning Perl Try purchasing a Book. O'Reilly would be good. After that you can go to : http://cgi.res

RE: write to file

2003-01-17 Thread Dylan Boudreau
open FILEHANDLE, "> output.txt" or die "$!"; print FILEHANDLE "Some text\n"; print FILEHANDLE "Some more text\n"; close FILEHANDLE; Dylan -Original Message- From: Thomas Browner [mailto:[EMAIL PROTECTED]] Sent: January 17, 2003 10:22 AM To: [EMAIL PROTECTED] Subject: write to file Ho

RE: Perl book

2003-01-17 Thread Dylan Boudreau
ey to getting a new one :-) Cheers, Dylan -Original Message- From: Randal L. Schwartz [mailto:[EMAIL PROTECTED]] Sent: January 15, 2003 11:23 PM To: [EMAIL PROTECTED] Subject: Re: Perl book >>>>> "Dylan" == Dylan Boudreau <[EMAIL PROTECTED]> writes: Dyla

Checking to see if input has valid data.

2003-01-15 Thread Dylan Boudreau
The input must be an email address and I am checking it the following way: print "Enter an address to replace: "; chomp (my $search = ); unless ($search =~ /@/){ die "Search field must be an email address!\n"; } print "Enter a replacement address: "; chomp

RE: Perl book

2003-01-15 Thread Dylan Boudreau
It is out of print according to amazon.com but if you check chapters.ca it is listed as being available and shipped within 24 hrs. Dylan -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: January 15, 2003 12:21 PM To: 'Dan Muey'; 'Dylan Boudreau

RE: Perl book

2003-01-15 Thread Dylan Boudreau
ary 15, 2003 11:32 AM To: Dylan Boudreau; [EMAIL PROTECTED] Subject: RE: Perl book The black books are very nice. I like them better than the Orielly ones. Not to start a flame war, I just like em better. Also there's the 'using perl' for specifci jobs, system admin, web programm

Perl book

2003-01-15 Thread Dylan Boudreau
I have already read Learning Perl and am looking to get another book to learn more what would people recommend? Thanks, Dylan

RE: Random Number Generation

2003-01-15 Thread Dylan Boudreau
int(rand 25000) Dylan -Original Message- From: Maurice O'Prey [mailto:[EMAIL PROTECTED]] Sent: January 15, 2003 10:28 AM To: [EMAIL PROTECTED] Subject: Random Number Generation Hi All How do I extract a whole number from the rand function. I am using rand 25000; which generates a ran

RE: menu

2003-01-10 Thread Dylan Boudreau
Thanks everyone, for some reason a regexpr never came to mind. Good thing its Friday, Dylan -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED]] Sent: January 10, 2003 1:35 PM To: Dylan Boudreau; [EMAIL PROTECTED] Subject: RE: menu You need a regular expression like Until

menu

2003-01-10 Thread Dylan Boudreau
I am trying to make a small menu for a script and the options are 1 or 2 or 9. I have it written like this until ($selection == '1|2|9'){ do some stuff } and it wont work. I know it is something simple but I am a little simple myself today and don't know what I am doing wrong. Than

RE: Module import error

2003-01-09 Thread Dylan Boudreau
ECTED] Subject: Re: Module import error Hi Dylan Check your version of Fcntl. The EXPORT_TAGS hash in Fcntl.pm should have an key of 'seek' which, according to the Perl dianostics, it doesn't. As a quick fix you could try: use Fcntl qw(SEEK_SET SEEK_CUR SEEK_END); HTH, R

Module import error

2003-01-09 Thread Dylan Boudreau
I am trying to use seek from Fcntl and am getting the following errors when I try and run the program. "seek" is not defined in %Fcntl::EXPORT_TAGS at /usr/perl5/5.00503/Exporter.pm line 67 Exporter::export('Fcntl', 'main', ':seek') called at /usr/perl5/5.00503/Exporter.pm line 182

RE: Editors

2002-12-19 Thread Dylan Boudreau
For you vi fans out there here is vi for windows http://www.winvi.de/en/ -Original Message- From: David T-G [mailto:[EMAIL PROTECTED]] Sent: December 19, 2002 11:28 AM To: perl beginners Cc: Paul Kraus Subject: Re: Editors Paul, et al -- ...and then Paul Kraus said... % % All great

Putting output back in the same file it came from

2002-12-10 Thread Dylan Boudreau
Here is what I am trying to do. I want to read all the files in a directory searching for a specific string, if the string is found I want it to be either changed or deleted depending on what I enter as a replacement string. I know I can do it by putting the output to a separate file and then jus

Creating a file with permissions _rw_______

2002-12-09 Thread Dylan Boudreau
I have my output going to a file I am creating at the time and want to have the file permissions as just _rw___ Is there a way to set the umask of the file when it is being opened? Thanks, Dylan

RE: Total Newbie

2002-12-06 Thread Dylan Boudreau
I bought the O'Reilly book "Learning Perl" as well as the O'Reilly Perl pocket reference. I found the learning perl book to be a great starting point and the pocket reference is invaluable for looking things up quickly. Dylan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTE

RE: Case Insensitive

2002-12-03 Thread Dylan Boudreau
I could be wrong here as I am still pretty new to perl but couldn't you just do it like this if ($x =~ /$y/i) Dylan -Original Message- From: SATAR VAFAPOOR [mailto:[EMAIL PROTECTED]] Sent: December 3, 2002 9:27 AM To: [EMAIL PROTECTED] Subject: Case Insensitive Hello

use warnings; and #!/usr/bin/perl -w

2002-11-26 Thread Dylan Boudreau
Is use warnings; the same as #!/usr/bin/perl -w Dylan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: matching regardless of case

2002-11-25 Thread Dylan Boudreau
At the end of the search string put a lower case i. if (/$keyword/i) { #do some things here } Dylan -- "Live as if your were to die tomorrow. Learn as if you were to live forever." - Mahatma Gandhi -Original Message- From: Chris Zampe