Sendmail.pm should be at:
/opt/MIMperl5/lib/5.00503/sun4-solaris/Mail/Sendmail.pm
The Mail:: prefix translates into a directory, hence the message:
Can't locate Mail/Sendmail.pm in @INC
- Johnathan
Nilesh wrote:
I have download Sendmail module and installed.
I also copied Sendmail.pm in my
You should reconsider using the bgcolor property at all since it has
been depreciated.
Depends on why it has been deprecated. It works. It's very backwards compatible. It is much more portable than style specifications.
Quite true. You have to even drag out the font tags for compatabilit
Not to be too much of a pain but...
You should reconsider using the bgcolor property at all since it has
been depreciated. Consider using CSS like:
body {background-color: #004152; }
...
Or at least:
From the looks of your code, I'm wondering if you 'use strict'. If you
You'll want to look at:
perldoc -f pack
perldoc -f unpack
if you're working with fields of pre-determined lengths and the database
files aren't delimited. Perhaps if you could post an example we could
give you better advice.
- Johnathan
Wiggins d'Anconia wrote:
tao wang wrote:
thanks.
Don't use sendmail. Use one of the perl modules designed to communicate
with SMTP servers like Mail::Sender or Mail::Sendmail (which,
confusingly enough has nothing to do with the sendmail program). The
documentation that comes with these modules should be more than enough
to get you going.
Hanson, Robert wrote:
>"How do I CREATE a database from within perl with MySQL?"
>
>I don't think you can... but you can run the mysql interface from the
>script. Actually I think that you can pipe a list of commands to mysql.
>
>Rob
>
If you can get a connection with proper permissions, all yo
You could connect to the mysql database. You don't need any permissions
to connect to a database, so this should work out fine. Though, the
question remains as to how you will set up the permissions from a perl
script. If you can use the mysqladmin, then you could always create the
database
I don't quite know where to begin... Was the AIX box running ancient
version of perl? I'm not surprised this won't compile. There's already
been one response, so I'll try to stick to what hasn't been said,
implementing the changes mentioned in the previous mail.
> # !/usr/bin/perl
>
> # !Mo
I would also be interested if anyone knows how to do this. We have
several system monitors that would be much more efficient if they could
actually call us when there is a problem rather than just sending email.
We have a pager that can recieve email, but that only helps whoever has
the page
You don't need perl for this. The easiest approach is to use the
"dos2unix" utility. Use "man dos2unix" for more information.
- Johnathan
Lilian Alvarenga Caravela Godoy wrote:
>Hi everyone
>
>I am trying to upload a windows txt file to a Linux server.
>
>There are an application running in
In my humble opinion, it doesn't make sense to break up the script that
generates the form and the one that validates it. Its hard enough to
maintain an application without having to worry about two scripts in two
different languages for something as simple as presenting and validating
a form
This looks like an issue we ran into when connecting with MS-SQL 7. Try
using two different database handles, one handles the query and the
other one to perform the inserts.
You also were missing a semi-colon after your print, but I think that
was probably an error in copying the code to the
Basically, you want to run ifconfig to get a list of which interfaces
are up and then look for ppp devices:
open IFCONFIG, "ifconfig |";
my @interfaces;
while(){
next unless /^(ppp\d+)/;
push @interfaces, $1;
}
close IFCONFIG;
This should give you what an array of what interfaces are u
Ted Lee wrote:
>Hey guys,
>
>I've been playing with Perl, and I've built a simple ICMP Ping sweep program
>that accepts start and end IP, and pings every host in between.
>
>Question I have is, I want to reduce the time it takes to do so, I was
>considering spawning a processes for X number of ho
Dennis G. Wicks wrote:
>Greetings;
>
>No, I mean if $names contains "Jesus Mary Joseph" and I do
>
> my @n = qw( $names );
>
>I want the same results as if I had done
>
> my @n = qw( Jesus Mary Joseph );
>
>Obviously qw() does not work this way, but I can't find the
>equivalent that d
This really isn't a perl question. Write out your javascript in a
simple HTML file and see if that works. If it does then port write the
perl code to output that HTML.
This isn't the forum for this but... When you call
nwin.document.write() you should be passing HTML, not just any old
stri
lt, le, ge, gt, eq, ne and cmp all do lexical comparisons.
<, <=, >=, >, ==, !=, and <=> do numerical comparisons.
"89" le "100" is false.
but
"89" <= "100" is true.
If you are trying to sort lexcally but you have some numeric data tossed in:
@array = ('foo','bar','23 Skidoo','pizza',',100 b
In parent.pl,
>$child{$pid} = {in=>$in,number=>$i,event=>$event,called=>1};
was supposed to be:
$child{$pid} = {in=>$in,out=>$out,number=>$i,event=>$event,called=>1};
- Johnathan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I just responded to a similar post "Forking in NT" but...
Use open2 or open3 to comunicate with child processes. If you're just
coding for win32 then you may want to also look at the Win32 modules,
especcially Process.pm and Event.pm. There are some examples in
C:\Perl\site\lib\Win32. Below
My advice is not to use fork if you want your script to run cross
platform. You will have enough problems writing cross-platform,
multi-process perl code without dragging fork into it. The safest and
simplist way to do what you want is to use open2 or open3 to pipe to and
from child processe
I was actually surprised to see that ssh worked like this! I don't
think you can always get away with it, but I just tested it out and was
able to call up ssh for 4 different machines using a script similar to
that one. I don't think all programs are going to be that nice.
Can anyone explain
# Create array @hosts... So far so good.
my @hosts=qw( lunar solar venus mars saturn pluto );
# \@hosts creates a reference to @hosts. You just want @hosts.
#
# The way you've written it, the elements in @hosts will be
# assigned to the special variable $_. This is all right, but
# tends to ge
Jon Serra wrote:
>Greetings,
>
>I have an array, each element will contain a reference to another array. How
>can I dynamically generate each of those references such that each reference is
>unique. I am trying to create dynamic 2d arrays. TIA JON
>
#
# The key is understanding 'my' an
>
>
>client=& # 8 digits and then ampersand
>
>so what I want to strip out is stuff like:
>
>client=23894749&
>
You want something like:
$url =~ s/client=\d\d\d\d\d\d\d\d&//;
or if you don't want to count those \d's
$url =~ s/client=\d{8}&//;
And since cilent=& probably can pr
You might want to look for volunteer oprotunities in your area. Its a
great way to promote open-soure while building your resume. Schools and
non-profits are often in need of people to put together networks,
websites, and databases. The great thing about it is they're greatful
for your help
Brett W. McCoy wrote:
>On Fri, 25 Jan 2002, IT Workflow - Terry Honeyford wrote:
>
>>I am trying to print out only the lines that begin with Either "Unable to
>>attach to", OR "Backup of"
>>and append to the line "NOT OK" or "OK" depending on which match I get
>>Here is the offending bit of scrip
Unless these are massive files I would say just store them in the MySQL
database as a text field. Don't worry about your markup DBI's quote
method will take care of all of that nastiness. If you are set on
having separate files, I would say just make them HTML snippets and name
them however
If you are connecting from a Win32 machine to a database you can
configure your ODBC databases through the control panel. Lets say you
called the database 'example'. You can now connect to the database using:
my $dbh = DBI->connect('dbi:ODBC:example',$user,$passwd);
Of course, you will have
Try:
/\[GUARD\] ([^<>]+)<(\d+)><(\d+)><([^<>]+)> ([^<>]+) <({^<>]+)>/
To limit the characters you were matching with '.' to anything but angle brackets or:
/\[GUARD\] (.+?)<(\d+?)><(\d+?)><(.+?)> (.+?) <(.+?)>/
To cause the matching to be non-greedy and not swallow up the ">
Hanson, Robert wrote:
>It's been a long time since I worked on IIS, but I believe the "Method not
>allowed" error refers to GET, POST, PUT, and HEAD. In IIS you can
>allow/deny each of these, but I forget exactly where in the MMC that this
>was located, it was with the file types.
>
>So maybe ".
In perl:
(($n < 1) || ($n > 12)) is true when n is less than 1 or if n is greater
than 12. Try this:
for my $n (-5..17){
if (($n < 1) || ($n > 12)) {
print "True for \$n = $n\n"
} else {
print "False for \$n = $n\n"
}
}
Double check your logic. Are you sure you're
Your choices are basically GD or Image-Magick I've had good experiences
with both. Image::Magick is more full featured but slower so if you're
doing anything on the fly you should use GD, but if its just a one pass
sort of thing (and I think that is what you're doing) then Image::Magick
is be
>
>
>But how could I take two arguments from the command line:
>
>i.e. my guess:
>
>%Test.pl "Foo" "Bar"
>
>#/!/usr/bin/perl
> $A = $ARGV[0];
> $B = $ARGV[1];
> print "Thing A: $A Thing B: $B";
>
I think you already answered your own question! Though your shebang
line should be "
You could limit the password complexity to a level to where you could
use a brute force attack to crack it in a few (seconds|minutes|hours).
Of course that means that someone else would be able to as well, but if
they can get to the encrypted passwords then your in trouble already.
The passwo
>
>
>I did this in one of my programs and it seemed to work just fine:
>
>system("$command &");
>
Check it out again.
contents of child.pl:
#!/usr/bin/perl
sleep 10;
print "child exiting\n";
contents of parent.pl
#!/usr/bin/perl
system( "perl child.pl &" );
print "parent exiting\n";
You will
I know this probably isn't a beginners question...
I need to set up a proxy server to filter IFRAME tags before a thrid
party piece of software sees them and chokes on them. The third party
application is good about listening making requests using a proxy on any
port I want, I just need a pro
This one got under my skin so I did a little research:
> use strict;
> use FileCache;
> my $a01;
> $a01 = 'a01file';
> cacheout $a01;
> print $a01 "XYZ\n";
It seems that perl decides that its calling print with arguments '$a01
"XYZ\n"' and then chokes on the argumen
The error is a bit misleading. The problem is you need an operator
between $ao1 and "XYZ\n". Try:
print $a01, "XYZ\n";
or
print $a01 . "XYZ\n";
This should clear things up. I don't know whay perl is trying to do with it if you
don't "use strict"...
- Johnathan
>
> How can I fix this so
> @parms = @_;
> ($user, $user_list, $tag) = split /,/, $parms;
Did you mean:
my($user, $user_list, $tag) = @_;
Try using:
use strict;
at the top of every script. The problem is that @parms is not $parms.
In fact, $parms is undefined, and use strict would point out this
error. Yo
Honestly, I've never had to. I would use Mail::Mailer except I don't
see it with ActiveState's ppm. Its possible with Mail::Sendmail,
looking at the source I see the note:
Look at http://alma.ch/perl/Mail-Sendmail-FAQ.htm for additional info
(CGI, examples of sending attachments, HTML mai
Aww... you should have let him hire a consultant. ;o)
Seriously though, this is dead simple. Gary's code is great and robust
if a bit intimidating for a newbie. You said you have background in
VisualBasic and that would lead me to think you might be using windoze
NT or 2000. (Unfortunately
Try throwing this into file2.pm:
sub AUTOLOAD {
print "What hath god wrought?\n"
}
And then call:
file2->any_function_name;
That is if you have a:
use file2;
AUTOLOAD is a catch all function, method really, but this should work
considering how Perl blurs the line b
Camel Book, page 851:
One solution for this is to use the standard FindBin module:
use FindBin;
use lib $FindBin::Bin;
This will do just what you want. By the way, to anyone who will listen:
Get the Camel Book, "Programming Perl 3rd ed." published by O'Reilly.
If you are serious abo
>
> #!/usr/local/bin/perl
> use strict ;
> my $ucmvob = "/ebppvobstore/vobs/UCMCQ" ;
> my $PR_NAME = ;
> my $vobname = `cleartool lsproject -invob $ucmvob | grep $PR_NAME` ;
> my @prjname = split /\s+/, $vobname ;
> my $prjstream = `cleartool lsstream -in @prjname[1]\@$ucmvob | grep Int` ;
Did
Probably the easiest way to do this is if the machine that will be
running the command is a web server. You can just set up the script you
want to run as a cgi and have the calling script call the cgi via http.
Now, this is assuming alot, like security is not an issue and your web
server has
The void context means that you're doing something that does nothing useful.
$num * 3;
Takes the value of $num, multiplies it by 3 and then trows the result
away, leaving $num unchanged. I think you want *= like this:
use strict;
print "Please type an integer: ";
chomp( my $num = );
while(
There's already a lot of good advice here, but just one more thing...
Some people write HTML code like this
Using:
s/<.*?>//g
Doesn't account for that and it won't match.
To allow '.' to match line breaks in tags, use:
s/<.*?>//gs
- Johnathan
47 matches
Mail list logo