On Fri, Apr 05, 2002 at 05:15:08AM -0800, drieux wrote:
>
> ### #!/usr/bin/perl
> ###
> ### use HTML::Parser;
> ### use HTML::FormatText;
> ### use HTML::TreeBuilder;
> ###
> ### my $html_text;
> ### my $filename = $ARGV[0];
> ### open(FH, $filename) or die "unable to open file $filename :$!\n";
Pfft Windows... I noticed it placed carrige returns in all over the
place. I removed them and all is working fine :)
*CHRISIS OVER*
On Sat, 2002-04-06 at 16:02, Tanton Gibbs wrote:
> I typed this in just as you have it and it works fine for me.
>
> what versions of perl and CGI are you using?
Hi: I have a situation...
I'm designing a complete program in HTML/Javascript/Perl/MySQL and this is
looking very cool. Can I disttribute this in a standaralone version with
PerlApp? What happen with all images that is necesary for the display? Think
about a Portal in the Web. Can I transform all
I typed this in just as you have it and it works fine for me.
what versions of perl and CGI are you using?
Also, are you SURE that the program below is what you are tyring to run.
- Original Message -
From: "Daniel Falkenberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday,
#!/usr/bin/perl -w
use CGI qw(:all);
print header();
print<
Hello World!
HTML
This on any other day seem very simple to me but for some reason I am
recieving the following error?
Can't find string terminator "HTML" anywhere before EOF
I have tried with or without HTML; but still not lu
You're right.
Thank you so much for pointing it out.
I highly appreciate your help.
Loan
--- Timothy Johnson <[EMAIL PROTECTED]> wrote:
>
> I think your problem is this line:
>
> next if $file =~ /\./;
>
> Any file that has a period in the name will not be
> removed. I'm assuming
> that w
I think your problem is this line:
next if $file =~ /\./;
Any file that has a period in the name will not be removed. I'm assuming
that what you wanted to do was skip . and .. If that is the case, then try
something more like this:
next if $file =~ /^\.{1,2}$/;
-Original Message-
F
This is how i use the unlink. Please take a look.
Thanks.
---
#!/usr/bin/perl
# clean old file
use Carp;
$cur_time = time; # current time in epoch (in
seconds)
$dir = '/opt/sybase/OCT/dump/';
$hour = 10 ;
opendir DIR, $dir || die "Failed to open $dir: $!";
my @files = readdir DIR;
On Friday, April 5, 2002, at 05:14 , loan tran wrote:
[..]
> I want to remove *.tar and *.Z file too.
>
> Any suggestions?
how were you building your list of files to be removed?
i just built both *.tar and *.Z files and was able to
remove them with a perl script using the methods listed
in
On Friday, April 5, 2002, at 04:09 , Moonlit Submit wrote:
[..]
> #
> my %email = (
> Server => 'smtp_server_name',
> To => $mlist,
> From=> "$sub/$listname",
> Subject => $subject,
> Message =>
> "$top_
Hi,
Try the one attached.
Do you know how to write this correctly?
I want it to use mail::sender.
Thanks,
Lisa
#
sub dosend{
print $q->header;
&checklogin;
&getdate;
&header;
if ($banner eq "yes") {&banner1;}
if($subject eq ""){print qq|You forgot to enter a subject! try
Hello,
In my perl script I use "unlink" to remove files which
are older than a given hours.
After I ran the script, I saw all the files were
removed except tar and zip files.
Why unlink does not remove *.tar and *.Z files?
I want to remove *.tar and *.Z file too.
Any suggestions?
Thank you in
I wonder if anyone on this list might have a perl script that accesses a
POP mailbox and culls out bounceback-type emails?
I need something that i can run locally to connect to a remote box and
filter messages based on typical bounceback criteria ("Undeliverable",
"Mail Error", etc) and write the
Hey, is there anybody out there than can give me a really short example of
retrieving text from an Entry box? I see in the documentation that you use
the $entry-gtget, but there aren't any syntax examples.
What I have so far:
use tk;
my $main = MainWindow->new();
$main->minsize(100,100);
$main
You could try doing the whole path to the module:
Module::Part2::sendmail
-Original Message-
From: Moonlit Submit [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 4:32 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Simple, Quick Syntax Question
I Did, and now I get
I Did, and now I get this:
Software error:
Undefined subroutine &main::sendmail called at members.cgi line 589.
it also doesn't appear to be sending.
Lisa
>From: "Timothy Johnson" <[EMAIL PROTECTED]>
>To: "'Moonlit Submit'" <[EMAIL PROTECTED]>
>Subject: RE: Simple, Quick Syntax Question
>Date:
Which is line 589?
-Original Message-
From: Moonlit Submit [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 4:10 PM
To: [EMAIL PROTECTED]
Subject: Simple, Quick Syntax Question
Hi,
I receive this error when using what's below that someone told me to use:
syntax error at members.
> I receive this error when using what's below that someone told me to use:
Try adding:
use diagnostics;
to the top of scripts that don't work, especially if you need hints :)
> syntax error at members.cgi line 589, near ")
> sendmail"
Read carefully, it is complaining about finding ")", then
Hi,
I receive this error when using what's below that someone told me to use:
syntax error at members.cgi line 589, near ")
sendmail"
Is there something I can do easily to fix it?
Thanks,Lisa
#
my %email = (
Server => 'smtp_server_name',
To
> > Function calls in Perl are dead slow compared
> > to compiled languages.
>
> Ok, so why is this?
>
Implementation and little optimization.
Perl has a complex function calling mechanism, as
it flattens argument lists by pushing elements onto
the stack, records argument list length - the
num
On Friday, April 5, 2002, at 02:51 , Jonathan E. Paton wrote:
> Function calls in Perl are
> dead slow compared to compiled languages.
Ok, so why is this?
will this get 'fixed' in p6?
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
On Fri, Apr 05, 2002 at 04:05:13PM -0500, Michael Gargiullo wrote:
> I'm on a Redhat 7.0 box with the default install of Perl. I want to use the
> Getopt::std module, but it's not installed. I went to cpan.org and they
> have the docs, but it looks like that module is supposed to be installed
>
Hi Adam,
> I'm having problems with the old "Internal Server Error" issue. I
> know that this is generally due to permissions. I have used chmod go+rx -R
*, but no
> joy. The html now works but not the cgi. Thoughts?
You need to declare a ScriptAlias directive for the "cgi-bin" directory in
the A
> With alot of calls to the function (approx 10% more
> than #'s in array, so ALOT ), would it be quicker
> to just put the function stuff in the do loop?
Yes, probably quite a bit. If the function stuff
isn't useful elsewhere then it would be
significatly faster. Function calls in Perl are
dea
On Friday, April 5, 2002, at 02:15 , Balint, Jess wrote:
> I need to use a database dump with this. I have the database dump run like
> $data = `query`;. Please don't ask about that.
don't ask, don't tell, No Problem.
> How can I use a filehandle to
> grab the information from the shell outpu
Howdy:
Just wanted to say thanks and post what I
finally came up with in the code (for the first
part of what I'm trying to do, anyways ...)
Will have to edit; I'm not even using the start_form
sub query ... figured this was as 'bare bones' as I
could make it.
(*special thanks to elaine a., br
I need to use a database dump with this. I have the database dump run like
$data = `query`;. Please don't ask about that. How can I use a filehandle to
grab the information from the shell output?
-Original Message-
From: drieux [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 5:14
On Friday, April 5, 2002, at 01:54 , Balint, Jess wrote:
> I know this may be an oddball question, but can I stream data into a file
> over Net::FTP?
interesting idea: given that perldoc Net::FTP
says:
put ( LOCAL_FILE [, REMOTE_FILE ] )
Put a file on the remote server. "LOCAL
I know this may be an oddball question, but can I stream data into a file
over Net::FTP?
Ex. Perl generates random numbers and sends them to a file remotely over
Net::FTP as they are generated.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I'm on a Redhat 7.0 box with the default install of Perl. I want to use the
Getopt::std module, but it's not installed. I went to cpan.org and they
have the docs, but it looks like that module is supposed to be installed
with the perl executables, not as a seperate module.
Any ideas?
-Mike
-
You may want to cycle through the file, line by line:
while(){
chomp;
if( . . .
}
}
That should do it.
-Original Message-
From: Glenn Cannon [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:57 PM
To: [EMAIL PROTECTED]
Subject: Problem testing variable
chomp($winner) before your if statements. or do if ($winner eq "na\n")
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "Glenn Cannon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 05, 2002 12:56 PM
Subject: Problem testing va
most of the time... when a file is closed, even it's one line, a newline
character is appended if there isn't one.
replace:
$winner = ;
with :
chomp($winner = );
and you should be good.
> -Original Message-
> From: Glenn Cannon [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 05, 2002
open (RSTDATA, "rst/r".$event.".rst")|| print "Oops";
$winner = ;
if ($winner eq "na")
{
print "FinalistsDid Not Play";
}
else
{
print $winner;
}
Why does the above code always print the value of $winner, and never
FinalistsDid Not Play, even when the line of text in the file is
just the letters
You mean like this?
foreach $file(@files){
open(OUTFILE,">$file");
print OUTFILE $data;
}
-Original Message-
From: Helen Dynah [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 12:32 PM
To: [EMAIL PROTECTED]
Subject: Array of file paths.
Hi again,
I have an array of
I don't mean to keep this thread going, BUT some questions come to mind
while reading this. With alot of calls to the function ( approx 10% more
than #'s in array, so ALOT ), would it be quicker to just put the function
stuff in the do loop? Also, I don't think a tied array would do any good for
m
# loop through the file list assigning each name to $filename
foreach my $filename (@files) {
# open the file named $filename for overwrite.
open FILE, ">$filename" or die "Could not open $filename: $!\n";
# print data to the file
print FILE "data";
# close the file
close FILE;
}
-
Hi again,
I have an array of file paths. I made this array so that I can open several different
files one at a time. I want to iterate through this array by opening each file,
writing some data to it and closing it. Does anyone know how I would go about doing
this? Thanks in advance.
> Hello all. I have been working on this all day.
Excellent, you'll appreciate my 5 minutes of effort all the more :P
> I am trying to print out numbers 1 through 10 as this loop progesses.
> For some reason, it doesn't print the numbers until the end of the loop.
If you have that problem, try:
Cool. Works great. Thanks guys!
-Original Message-
From: Chas Owens [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:11 PM
To: Balint, Jess
Cc: '[EMAIL PROTECTED]'
Subject: Re: Print Question
On Fri, 2002-04-05 at 14:37, Balint, Jess wrote:
> Hello all. I have been working on t
On Fri, 2002-04-05 at 14:37, Balint, Jess wrote:
> Hello all. I have been working on this all day. I am trying to print out
> numbers 1 through 10 as this loop progesses. For some reason, it doesn't
> print the numbers until the end of the loop. The $done variable is set to 1
> by the getUniqRand(
On Fri, 5 Apr 2002, Balint, Jess wrote:
> Hello all. I have been working on this all day. I am trying to print out
> numbers 1 through 10 as this loop progesses. For some reason, it doesn't
> print the numbers until the end of the loop. The $done variable is set to 1
> by the getUniqRand() functi
Hello all. I have been working on this all day. I am trying to print out
numbers 1 through 10 as this loop progesses. For some reason, it doesn't
print the numbers until the end of the loop. The $done variable is set to 1
by the getUniqRand() function once certain conditions are met. Everything
wo
Thanks everyone for all the help. The suggestions worked great.
Helen
Note: forwarded message attached. Music, Movies, Sports, Games! Yahoo! Canada Entertainment--- Begin Message ---
Hi everybody. I am a new user and my first question to this list is probably a very
simple one. I am tryi
On Fri, 2002-04-05 at 13:46, bob ackerman wrote:
> or, to continue to discussion:
> @s = $string =~ /,/g;
> print scalar @s,"\n";
>
> i don't know how to get count directly assigned to variable. someone?
>
I believe it is as simple as:
$count = () = $string =~ /,/g;
--
Today is Setting Ora
or, to continue to discussion:
@s = $string =~ /,/g;
print scalar @s,"\n";
i don't know how to get count directly assigned to variable. someone?
On Friday, April 5, 2002, at 10:29 AM, Timothy Johnson wrote:
>
> Just for the sake of argument, you can also do it using the /g switch of
> m//.
>
>
Just for the sake of argument, you can also do it using the /g switch of
m//.
while($string =~ /,/g){
$num++;
}
-Original Message-
From: Tanton Gibbs [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 10:06 AM
To: Helen Dynah; [EMAIL PROTECTED]
Subject: Re: Variable question
T
Hello all,
I have some code that is doing the following:
system( "rcp -p ${target} ${source}");
With target being the machine and file I want to get, and the source, where I
want to put it.
Sometimes these files can be 17+ MB in data and can take 20 minutes to
transfer. I realize that this
The tr operator will translate one character to another. For example:
my $string = "abc";
$string =~ tr/a/d/;
print $string;
prints
dbc;
However, it also returns the number of changes it did. So, if you don't
give it anything to change to, you can count how many occurrences of a
character we
On Friday, April 5, 2002, at 09:29 , Aman Raheja wrote:
> Hi All
> Why can't I move to the parent directory using
> system "cd ..";
> Actually cd command doesn't work at all with system !!! why ?
note: 'system' invokes a 'sub shell' - and that
sub shell changed directories - while the calling
c
Hi everybody. I am a new user and my first question to this list is probably a very
simple one. I am trying to count the number of commas in a variable. The book I am
learning from doesn't cover specific information like that. Thanks for any help.
Helen
--
Hi All
Why can't I move to the parent directory using
system "cd ..";
Actually cd command doesn't work at all with system !!! why ?
Though I can do so by
chdir("..");
Is there a way to physically move to another dir, for eg.
[aman@aman /usr/home/aman]$./pdir.pl
[aman@aman /usr/home]$
Thanks in
On Fri, 2002-04-05 at 11:17, Nikola Janceski wrote:
> uh... '->' is used as a dereferencer also, but I also dereference my code as
> so..
>
> $value = $$ref2hash{'key'};
> @slice = @$ref2array[0 .. 2];
>
> I really need to find the time to read the Articles but between work and
> taxes
>
>
Look for a perl module here
http://jenda.krynicky.cz/#Mail::Sender
Sends via socket connection... Very Nice
-Original Message-
From: Moonlit Submit [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:54 AM
To: [EMAIL PROTECTED]
Subject: Aacckk!
Hi,
I need the following subroutin
you are writing $line to NEW after the code you showed.
you want to 'print NEW $line' first, then 'print NEW "test\n"'.
On Friday, April 5, 2002, at 06:57 AM, Jorge Goncalvez wrote:
> Hi, I have this:
> I write to a file like this:
> ..
> while ($line = < {
>
>if ($line=
Can some one please look at my code ad see what I am doing wrong.
For some reason it is not working when there is less then three running. if
you look at the log file it is reading you will see that only 2 are running
and it did not send an email.
CHK_SBL_PRD WorkMon 97015 409 Runnin
drieux [[EMAIL PROTECTED]] quoth:
*>
*>My real concern is grovelling through old grot to figure out
*>like what it Thinks It is dependent upon.
*>
*>This way folks could self grovel their code and be able to
*>provide their basic 'my code needs' foo info when presenting
*>questions about the code.
On Wednesday, April 3, 2002, at 05:48 , Bruno Figueira wrote:
[..]
>
> I guess that from this point you can improve your scripts. A socket
> connection is just an interface between two scripts/applications. You'll
> have to build your protocols above this "layer" so that one side is making
> res
On Friday, April 5, 2002, at 12:16 , paul beckett (JIC) wrote:
> Does anybody know if you can send a binary file (eg. excel spreadsheet)
> via
> a socket connection (I'm using the IO::Socket::INET module); and if so
> how?
yes - I think the question is how to have the reader on the
socket und
On Friday, April 5, 2002, at 06:57 , Elaine -HFB- Ashton wrote:
[..]
> use ExtUtils::Installed;
> my $instmod = ExtUtils::Installed->new();
> foreach my $module ($instmod->modules()) {
> my $version = $instmod->version($module) || "???";
>print "$module -- $version\n";
> }
[..]
Ok - that
On Friday, April 5, 2002, at 05:36 , Alex Read wrote:
> I would like my perl script to login to a different machine and then
> execute the rest of the script on that machine. I'm working in a
> UNIX/LINUX environment. Can anyone point me in the right direction?
> Thanks
p1: the trick you are
On Thursday, April 4, 2002, at 11:46 , M z wrote:
[..]
> $tree = HTML::Tree->new();
> $tree->parse_file();
> print X1 "$tree\n";
[..]
Wow - had not even thought about doing the 'open' by hand.
I had merely taken a list of files from the command line
and let the 'tree' open and parse them.
I'd
uh... '->' is used as a dereferencer also, but I also dereference my code as
so..
$value = $$ref2hash{'key'};
@slice = @$ref2array[0 .. 2];
I really need to find the time to read the Articles but between work and
taxes
> -Original Message-
> From: Chas Owens [mailto:[EMAIL PROTECTE
On Thu, 2002-04-04 at 10:39, Timothy Johnson wrote:
>
> At the risk of beating a dead and bloated horse, I have no doubt that I will
> enjoy and take advantages of the improvements in Perl6, but I still don't
> see the logic in changing operators. I mean, why make old code unusable?
> If you ca
I watch top. ;>
> -Original Message-
> From: Kevin Old [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 05, 2002 10:12 AM
> To: [EMAIL PROTECTED]
> Subject: Determining program efficiency
>
>
> Hello all,
>
> I would like to know how others test their programs for
> efficiency for the
Hello all,
I would like to know how others test their programs for efficiency for their
use of memory and processor time, etc.
I am not aware of any other ways of actually knowing if a program is running
at it's optimized potential. The only thing I've used to date is the
Benchmark module
On Fri, 2002-04-05 at 03:53, Moonlit Submit wrote:
> Hi,
> I need the following subroutine to NOT use sendmail -t.
> How the heck do I do that> I paid a gazillion dollars to have this script
> made and it is hogging resources...aacc!
> Lisa
>
Boy, you go
Jonathan E. Paton [[EMAIL PROTECTED]] quoth:
*>Correct, they are standard modules - apparently not available any other
*>way... I presume so that you know the standard ones are working for a
*>given version of perl.
*>
*>You *could* download Perl 5.6, and transplant them... and fix the minor
*>pro
Change open(MAIL,"|$sendmail -t"); to open(MAIL,"|$sendmail"); ?
- Original Message -
From: "Moonlit Submit" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 05, 2002 12:53 AM
Subject: Aacckk!
> Hi,
> I need the following subroutine to NOT use sendmail -t.
> How the heck
Hi All
I have been reading this Perl 6 thread and it has brought me a laugh
or two as I thought about my career. I have been a programmer for more then
40 years. The first computer I used you programmed by wiring boards with
jumper wires. This was upgraded to one that was programmed one b
Depends on your requirements, are you going to pass command line arguements?
(that should be easy for you to figure out) Or do you want the state of all
variables to be saved on the first machine and finish off using the same
vars on the second?... if so you should dump the vars to a shared area i
volks,
The basic problem -
I want a perl script that will parse out the 'use FOO::BAR'
stuff from other perl scripts so that it will then be able to
resolve which revs it will be using.
eg:
vladimir: 129:] perl GetUseVersions PlainSpeak
HTML::Parser - 3.26
HTML::Format
Hello -
I would like my perl script to login to a different machine and then
execute the rest of the script on that machine. I'm working in a
UNIX/LINUX environment. Can anyone point me in the right direction?
Thanks
Alex.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
On Thursday, April 4, 2002, at 01:19 , murphy, daniel (BMC Eng) wrote:
> Just did this with the help of "Perl Cookbook" (this book is great).
>
> Chapter 20.6 Extracting or Removing HTML tags
>
> use HTML::Parse;
> use HTML::FormatText;
> $plain_text = HTML::FormatText->new->format(parse_html($h
Hi! I'm new to perl and I would like to ask you
how does perl with html intergrades?
How can I call a perl script from my web browser?
I don't mean "... src=/../../test.pl"
What's next?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
Please be more specific... What messages do you get?
Greetz,
Wim
Rune Hegrenes wrote:
>Hi
>
>I have to create an perl script that connects to a sybase adaptive server enterprise
>database (ASE).
>I have downloaded a file called DBI-1.18.tar.gz. But I can't get it installed. It
>needs to
Hi,
I need the following subroutine to NOT use sendmail -t.
How the heck do I do that> I paid a gazillion dollars to have this script
made and it is hogging resources...aacc!
Lisa
sub dosend{
print $q->header;
&checklogin;
&getdate;
&header;
if ($banner eq
@list= Schelstraete Bart wrote:
>
> > (sorry, my previous message was signed, which can give some problems)
> >
> > Hello,
> >
> > Can somebody tell me if it's possible:
> > a) to count all the files in a directory , with extension 'msg' with perl
>
> Check out the glob operator of perl (perld
Hi
I have to create an perl script that connects to a sybase adaptive server enterprise
database (ASE).
I have downloaded a file called DBI-1.18.tar.gz. But I can't get it installed. It
needs to be compiled using make (nmake).
This does not work.
1. How do I do this?
2. Is there a DBI version
If you are running apache with mod_perl and if the site has more than a
couple of visitors an hour and you use Apache::DBI for connection
pooling, you can bet that you will speed up by using DBI. A lot. A
whole lot.
On Wed, 2002-04-03 at 18:33, Peter Scott wrote:
> At 04:28 PM 4/3/02 -0500, Kevi
Does anybody know if you can send a binary file (eg. excel spreadsheet) via
a socket connection (I'm using the IO::Socket::INET module); and if so how?
Thanks in advance,
Paul
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
81 matches
Mail list logo