Re: sendmail error

2001-12-13 Thread Akshay Arora
> use Mail:Sendmail; Try use Mail::Sendmail; # Two ::, not one -Akshay -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Matching a pattern only once

2001-09-14 Thread Akshay Arora
> my $filename = $File::Find::name; > if ($filename =~ /(\~){1}$/) { > # do something > } What you are doing here is matching only ~ as the entire filename. You should try $filename =~ /^[~]/ This looks for a character (~ in this case) at the beginning of the string. Since you're not interest

Re: two .pl use each other?

2001-08-21 Thread Akshay Arora
in this case you might consider using modules so, then you can do something like this in x1.pl use SOME_PACKAGE_NAME; $obj = new SOME_PACKAGE_NAME; #do x1 stuff $obj->call_x2_functions($arg1, $arg2); #call various functions to do x2 things print "some output"; #done with program other things

Re: problem with filtering a corpus

2001-08-21 Thread Akshay Arora
I think i know what you are looking for. If so, then there are 2 ways to do this. First you need to match everything before what you are looking for, then match your string, and then match everything after. Now, this will only work if you know _exactly_ what you are looking for. $your_string = "T

Re: can I get source for modules... CPAN?

2001-08-09 Thread Akshay Arora
also, if you have already downloaded the package via CPAN, then check the ~/.cpan/build directory for the source code as well "Brett W. McCoy" wrote: > > On Thu, 9 Aug 2001, Matthew Lyon wrote: > > > I'm looking for the source to Getopts::Long . pm > > It should be right there on your system.

Re: result of regexps into a string

2001-08-09 Thread Akshay Arora
since you know that the first thing on the log file is the IP number you only need to get the beginning of the line IP numbers have the format ddd.ddd.ddd.ddd ranging from 1 to 3 digits, so if(/$(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/) would grab the IP and put it in $1 the above will match IP numb

Re: code doesn't work

2001-07-28 Thread Akshay Arora
@temp=; #implies that TEMP is a read file handle print TEMP @temp; #implies that TEMP is a write file handle. I'm pretty sure that you can only do either read or write, but not both to the same FILE HANDLE. You can open 2 handles to the same file (which can cause a few problems...), but if you ar

Re: newbie DBI

2001-07-27 Thread Akshay Arora
There are quite a few ODBC modules out there. One that lets you program using the actual OLE ( I think they all do really), is the Win32 set of modules written by Dave Roth. The book he wrote is decent, all about Perl Win32 programming. I personally found programming for Access using Perl was quit

Re: regular expressions

2001-07-26 Thread Akshay Arora
$line =~ s/(\w)(\S*)/\u$1$2/g; Salvador Lopez wrote: > > Hello All, > > how can i convert only the first letter of each word > in a string without changing any other characters? > Is this a job for regular expressions? > > For example, convert: > > FROM: "hello world. goodbyecruel w

Re: script headers

2001-07-24 Thread Akshay Arora
also make sure that you are infact printing out a header. use CGI; $cgi = CGI; print $cgi->header; Sally wrote: > > Can anyone give me a general idea what the error premature end of script > headers means? Is it an incorrect filename, or that the file can't be found > or something else? > > --

Re: search and replace

2001-07-23 Thread Akshay Arora
your best bet would be to just either search for or just incase there are some odd things between and [EMAIL PROTECTED] wrote: > > I have a bunch of .html files that I want to add a style sheet to. > currently, the top of the html file has this: > > > > > > > name.JPG > > > > so how

Re: FW: Validation question

2001-07-17 Thread Akshay Arora
to get the form data you can just use CGI's param('key') command use CGI; $cgi = CGI; $value = $cgi->param('key'); as for Mail, there are lots of options. I've been partial towards MIME::Lite, but I know others will give you more example. Look into the Net package (Net::Mail perhaps?) -Akshay

Re: perl program for detecting sub-routine calls

2001-07-13 Thread Akshay Arora
hmm how about while(){ if(m/[^'].*?(\&[^&]\S+)[^"']/){ print "line $i: " . $1 . " is a subroutine\n"; } if(m/-\>(\S+)/){ print "line $i: " . $1 . " is a subroutine\n"; } $i++; } it's not perfect, but it'll do the job... -Ak

Re: How could I call a C-Programm

2001-07-12 Thread Akshay Arora
system call as the quickest solution, however I'm sure someone in this group knows of a perl module that might do this better? $rv = `cprog @args`; Jürgen Prietl wrote: > > Hi everybody! > > I want to call a external C-Programm with a parameter and a returnvalue > from my perlprogramm. > Could

Re: perl as win32exe

2001-07-12 Thread Akshay Arora
Perl2Exe will do this for you, at he cost of performace of course http://www.indigostar.com/perl2exe.htm Stefan Oswald wrote: > > I sometimes hear there is a compiler avalaible which produces win32exes out > of perl scripts ... > Has anybody further information ?? > > thx > > Stefan Oswald

Re: PRELOADING IMAGES FOR A WEB SITE

2001-07-11 Thread Akshay Arora
you can use perl to generate lots of javascript (if you have sequential images, and lots of them). Perl however is never seen by the browser. JavaScript however manipulates the content of a web-page after it has been loaded (and even while being loaded). enjoy the perils of using as many languag

Re: regexp and reading lines

2001-07-11 Thread Akshay Arora
Is all of this in one string or is being read in from a file? Do you have an example of what this text might look like? Now, comments. What you want to look for is the consistent differences between the two, and just break the line there. If there are multiple "heading" and "contents" within one

Re: Is there an alternative to CGI ???

2001-07-11 Thread Akshay Arora
let me redine...ASP using VB Akshay Arora wrote: > > ASP, personally, i can't stand it. Doing is now, and it's a pain. > > Perl, is great CGI, is OK. mod_perl, thank you for everthing. > > I suggest that you read into HTML::Embperl. It also supports inheritance &g

Re: Is there an alternative to CGI ???

2001-07-11 Thread Akshay Arora
I add to PHP: [+ $var +] works fine in Embedded Perl Jon Farmer wrote: > > > > > Personaly, i like ASP for the fact you can do <%=$var%> > > instead of php's > print $var; ?> > > > > > > Works fine in PHP > > Regards > > Jon -- http://www.5vs1.com - A Pearl Jam Fan Site "Only when the la

Re: Is there an alternative to CGI ???

2001-07-11 Thread Akshay Arora
ASP, personally, i can't stand it. Doing is now, and it's a pain. Perl, is great CGI, is OK. mod_perl, thank you for everthing. I suggest that you read into HTML::Embperl. It also supports inheritance within a given web-directory (apache confiuration). It lets you "insert" Perl directly into you

Re: PERL/Linux

2001-07-11 Thread Akshay Arora
Off the top of my head I can't think of anything better than system calls, and my books are at work, but you could simply use another system command: $who = `whoami`; $finger = `finger $who`; now, if that account has multiple logins, or multiple users using the same account (tsk on them) you will

Re: Why wont my REGEX match..

2001-07-11 Thread Akshay Arora
There is nothing in $2, because every time you do a RegExp, all of those variables get initialized. You do a $opt =~ s/ //g; before you request $2 do the $value = $2 before that line, and you will be fine. -Akshay Hamish Whittal wrote: > > Hi All, > > I have the following lines from a config

Re: Re-inventing wheels (WAS re: Required Fields Module)

2001-07-10 Thread Akshay Arora
yes CGI.pm is smart. But if you want better performance, make sure mod_perl is installed. It will cache all the compiled Perl code for you. as for the code below. It looks correct. If you wish to make it one line, you could just use the concat operator print "The color is " . para

Re: Re-inventing wheels (WAS re: Required Fields Module)

2001-07-10 Thread Akshay Arora
I personally favour HTML::Embperl and HTML::EmbperlObject (part of the former). easily installed through CPAN and into Apache for you if you want. Or you can explicitly call it from a CGI page or command line or another perl script. Morbus Iff wrote: > > >> >CGI.pm isn't the only solution to cr

Re: split log file

2001-07-10 Thread Akshay Arora
for using split, try to remove the ( ) since you will not be needing $1 through $9. I suspect because you have many ( ) in there, this might cause a problem. I also gather that you are trying not to really split, but to pattern match, in which case you can only have from $1-$9 (i belive that is co