Re: Problem of general running of simple perl program.

2012-11-05 Thread John Delacour
On 05/11/2012 03:01, hong zeng wrote: When I run the send_email example on the website, I got some warning like this...I am really a beginner so I don't know where to find the answer so I post here. Thank you guys. ece% perl ./perl_test/send_email.pl Can't locate Email/MIME.pm in @INC (@INC con

Re: Problem of general running of simple perl program.

2012-11-04 Thread Hal Wigoda
Download it and put it one of the directories in your @INC . On Sun, Nov 4, 2012 at 9:28 PM, Feng He wrote: > Seems this one: > http://search.cpan.org/~rjbs/Email-MIME-1.911/lib/Email/MIME.pm > > > 于 2012-11-5 11:22, hong zeng 写道: >> >> Where should I write this module and how? >> >> On Sun, Nov

Re: Problem of general running of simple perl program.

2012-11-04 Thread Feng He
Seems this one: http://search.cpan.org/~rjbs/Email-MIME-1.911/lib/Email/MIME.pm 于 2012-11-5 11:22, hong zeng 写道: Where should I write this module and how? On Sun, Nov 4, 2012 at 10:10 PM, Feng He wrote: >You have lost the module named as Email::MIME. > -- To unsubscribe, e-mail: beginners

Re: Problem of general running of simple perl program.

2012-11-04 Thread Hal Wigoda
Your script requires perl module Email/MIME.pm, Either variable @INC ( included librarries ) is not properly defined or set or the module is not present on your machine and needs to be loaded from CPAN. On Sun, Nov 4, 2012 at 9:01 PM, hong zeng wrote: > Hi, > > When I run the send_email example

Re: Problem of general running of simple perl program.

2012-11-04 Thread Feng He
You have lost the module named as Email::MIME. 于 2012-11-5 11:01, hong zeng 写道: Hi, When I run the send_email example on the website, I got some warning like this...I am really a beginner so I don't know where to find the answer so I post here. Thank you guys. ece% perl ./perl_test/send_emai

Problem of general running of simple perl program.

2012-11-04 Thread hong zeng
Hi, When I run the send_email example on the website, I got some warning like this...I am really a beginner so I don't know where to find the answer so I post here. Thank you guys. ece% perl ./perl_test/send_email.pl Can't locate Email/MIME.pm in @INC (@INC contains: /afs/bp.ncsu.edu/contrib/per

Re: Simple perl program

2003-03-26 Thread Matt O'neill
works well now that great, I was wondering how could i get it to list the files from the subdirectories as well? maybe using the -d command ? cheers matt. "James Kipp" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] . > > > Im now trying to list a directory, but only the files in t

Re: Simple perl program

2003-03-26 Thread Rob Dixon
R. Joseph Newton wrote: > > The problems with operators may come from the way some characters are used as control > characters in some contexts. It might be best to try the qr() [quote-regex] or qm() > [quotemeta] functions to insure that any control character is properly escaped. There's not qm(

Re: Simple perl program

2003-03-25 Thread R. Joseph Newton
Matt O'neill wrote: > hi yeah, i have started to write the code but am having troubles with the > various operators around the search bit, anyway here goes: > > my ($file_name, $search_string) = @ARGV; You indicated problems with the operators around the search. I'll assume you mean operators c

Re: Simple perl program

2003-03-25 Thread Rob Dixon
James Kipp wrote: > > Im now trying to list a directory, but only the files in that > > directory that > > finish with a perticular ending, say .html, i.e *.html. Ive > > got this far, > > but having troubles, wondering if you could have a look for me: > > I guess this was mailed off-list? Thank

RE: Simple perl program

2003-03-25 Thread Kipp, James
> Im now trying to list a directory, but only the files in that > directory that > finish with a perticular ending, say .html, i.e *.html. Ive > got this far, > but having troubles, wondering if you could have a look for me: > you are pretty close, try the following use strict; use warning

Re: Simple perl program

2003-03-25 Thread Rob Anderson
Do I get marks for this then? "Jeff Westman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Sounds like a class homework assignment to me ;-) > > > > > > what code do you have so far? or are you having trouble getting started ? > > > --- "Kipp, James" <[EMAIL PROTECTED]> wrote: > >

RE: Simple perl program

2003-03-25 Thread David Olbersen
nal Message- > From: Matt O'Neill [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 25, 2003 8:34 AM > To: David Olbersen > Subject: Re: Simple perl program > > > Thanks david that sorted it, what does that m/ do then? > > Also I need to create another script tha

Re: Simple perl program

2003-03-25 Thread Aim
Hi, Just to add a hash option (assuming you have 2 files ), you will need to customise the regex; untested: __START__ open (FILE_A,$ARGV[0]) or die; open (FILE_B,$ARGV[1]) or die; while ( ) { if ( /^(\S+)\s/ ) { $A{$1}++; } } close(FILE_A); while ( ) {

RE: Simple perl program

2003-03-25 Thread David Olbersen
quot; and you should be good. -- David Olbersen iGuard Engineer 11415 West Bernardo Court San Diego, CA 92127 1-858-676-2277 x2152 > -Original Message- > From: Matt O'neill [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 25, 2003 8:11 AM >

Re: Simple perl program

2003-03-25 Thread Matt O'neill
hi yeah, i have started to write the code but am having troubles with the various operators around the search bit, anyway here goes: my ($file_name, $search_string) = @ARGV; open(INFILE, "< $file_name"); while () { if ($_ =~ $search_string) { print "yes\n"; exit(); } } print "no\n"; Tha

Re: Simple perl program

2003-03-25 Thread R. Joseph Newton
Matt O'neill wrote: > Hi guys, > > I need a very simple command line perl program that takes two arguements, > the frist being a filename and the second being a word to be searched for in > that file. Then I simply want the result to print "yes" if arg2 is found, > or "no" if it is not. > > Thank

RE: Simple perl program

2003-03-25 Thread Jeff Westman
Sounds like a class homework assignment to me ;-) > > what code do you have so far? or are you having trouble getting started ? > --- "Kipp, James" <[EMAIL PROTECTED]> wrote: > > > > I need a very simple command line perl program that takes two > > arguements, > > the frist being a filename

Re: Simple perl program

2003-03-25 Thread Rob Anderson
How about this case sensitive solution === #!perl -w use strict; my ($file_name, $search_string) = @ARGV; open(INFILE, "< $file_name") or die "Couldn't open $file_name for reading: $!\n"; while () { if ($_ =~ m/\Q$search_string\E/) { print "yes"; exit(); } } print "no";

RE: Simple perl program

2003-03-25 Thread Kipp, James
> > I need a very simple command line perl program that takes two > arguements, > the frist being a filename and the second being a word to be > searched for in > that file. Then I simply want the result to print "yes" if > arg2 is found, > or "no" if it is not. > > Thanks for your help what

Simple perl program

2003-03-25 Thread Matt O'neill
Hi guys, I need a very simple command line perl program that takes two arguements, the frist being a filename and the second being a word to be searched for in that file. Then I simply want the result to print "yes" if arg2 is found, or "no" if it is not. Thanks for your help matt. -- To un