Seems like the method you use to assign filename doesn't always occur.
Maybe you have the my $filename='whatever' in an if statement?
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Ahmed Moustafa [EMAIL PROTECTED]
To: Perl [EMAIL PROTECTED
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 variable
Are you looking to keep the basic formatting of the HTML in tact during the
conversion, or just want the HTML stripped? I wouldn't imagine that it
would be that hard to convert the HTML to text if the HTML wasn't overly
complicated.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
Do you have the postgres shared libs installed? I believe it's dependent on
that being present. That's just my guess.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Johnson, Shaunn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday
I find that
print Content-type: text/html\n\n;
doesnt always work. So I just use
print $CGI-header;
Regards,
Agustin Rivera
Webmaster, Pollstar.com / Pollstaronline.com
- Original Message -
From: Joe Echavarria [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 01
perl -MCPAN -e shell
- Original Message -
From: Sean Hoskin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 01, 2002 11:13 AM
Subject: Equivalent Linux tool to ppm
Is their a tool similar to ppm for Linux (Unix)?
You use a Windows machine and the golden rule is: Save,
Your html tag is misformatted for starters.
try
print img SRC=RP.jpg align=LEFT;
or
print img SRC=\RP.jpg\ align=LEFT;
I have no idea if the image is actually there, however :)
Regards,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Jerry
You're right. I was thinking div align=left when I deemed align=left a
valid tag.
Agustin Rivera [EMAIL PROTECTED] wrote in message
000d01c1d6a3$f7e83c50$9865fea9@agustinr">news:000d01c1d6a3$f7e83c50$9865fea9@agustinr...
Your html tag is misformatted for starters.
try
print img SR
This would do it...
#!/usr/bin/perl
use LWP::Simple;
use strict;
my $content=get(http://www.images.com/image.jpg;);
open(OUT, image.jpg) or die $!;
binmode(OUT);
print OUT $content;
close(OUT);
Regards,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message
while(IN)
{
$firstword=$middleword;
$middleword=$lastword;
$lastword=$_;
if ($firstword eq Installation $lastword eq Installation)
{
print FOUND $middleword\n;
}
Would that work?
Regards,`
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
Well, the script thinks you're doing a search pattern, AND you're not using
~ properly. Try
x = ~/rambo/bin/script1;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Roy Peters [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March
Try adding
my @html=split(/\n/, $html);
foreach my $line(@html)
{
#process
}
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
How would that work with use strict;? I tried it once and when I declared my
$opt_n before using getopts, it wouldn't work.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Timothy Johnson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Beginners Perl
Ok, I've tried it both ways and it returns 1 (true) as the value. What am I
doing wrong?
#!/usr/bin/perl
use strict;
use Getopt::Std;
my %opt;
getopts('h', \%opt);
print $opt{h}\n;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Chas
Is there anyway to change the Default Input Record Separator.. or $/ .. to
allow me to read a character at a time?
I tried $/=~ /./; but it doesn't work.
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Is there anyway to change the Default Input Record Separator.. or $/ .. to
allow me to read a character at a time?
I tried$/=~ /./;but it doesn't work.
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED
PERFECT. You don't know how much I appreciate this...
Much thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Timothy Johnson [EMAIL PROTECTED]
To: 'Agustin Rivera' [EMAIL PROTECTED]; Timothy Johnson
[EMAIL PROTECTED]; [EMAIL PROTECTED
..
open(OUT, image.jpg) or die $!;
binmode(OUT);
print OUT $content;
close(OUT);
my $image=GD::Image-newFromJpeg(image.jpg);
my ($width,$height)=$image-getBounds();
Error:
Can't call method getBounds on an undefined value at ./sendanf.pl line 32.
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http
It's probably because the of the file path. Try specifying the whole path
to see if it works.
Regards,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Eric Preece [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 20, 2002 1:52 PM
, and I certainly
don't expect them to know how to run (or understand) perl autogen.pl.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Nikola Janceski [EMAIL PROTECTED]
To: 'Chuck' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 11, 2002
is there, and works just fine for 10-20 times in a row
before randomly failing. The server is Apache and ModPerl. I'm so unsure
of what is going wrong, I don't know of what other information to include
for help.
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
How about something like this...
open(IN, hogfile.txt) or die $!;
while(IN)
{
$oldestline=$line;
$line=$newestline;
$newestline=$_;
if ($line =~ terms you want)
{
## process oldestline and newestline for more matches
}
}
Agustin Rivera
Webmaster, Pollstar.com
You might be able to run a script written for *nix if you have Cygwin
installed and run it from there.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Craig Williams [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 12
Try this as a base to get the data
use strict;
use LWP::Simple;
my $add=http://www.worldofcgi.com/process.cgi?term1=helloterm2=world;; ##
after ? are gets
my $content = get($add);
print $content;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message
I'm getting a ton of errors just trying to get your code to work. But since
you are addressing the simple grabbing of a web page, does this code work...
use LWP::Simple;
use strict;
my $address=http://www.pollstar.com;;
my $content = get($address);
print $content;
Agustin Rivera
Webmaster
I'm not sure that's it, because this code just ran fine on my Windows 2000
box...
use LWP::Simple;
use strict;
my $address=http://www.pollstar.com;;
my $html_file='temp';
LWP::Simple::is_success(LWP::Simple::getstore($address, $html_file));
Agustin Rivera
Webmaster, Pollstar.com
http
Yes, modules are it. Here is an example...
require 'plibs.pm';
plibs::cat(readme.txt);
---
then in the module
---
package plibs;
use strict;
sub cat
{
my $file=shift(@_);
my $data;
open(IN, $file) or die $!;
while(IN) {$data.=$_;}
close(IN);
return $data;
}
1;
Agustin Rivera
Try this simplistic sequence...
$content=~ s/\n/RETURN/g;
$content=~ s/.*?//g;
$content=~ s/RETURN/\n/g;
print $content;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Daniel Falkenberg [EMAIL PROTECTED]
To: Agustin Rivera [EMAIL PROTECTED
didn't
search hard enough.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
[0][0] and not $array[0] (if anyone has the proper
terminology on this, I'd appreciate it).
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
If I think I am understanding you right, try
$name=~ s/\s+^//g;
Means any white space (\s+) before the end of name (^), remove (blank in
between the //'s)
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Susan Aurand [EMAIL PROTECTED
Is there anyway to get a Win3::GUI app to not display the DOS console when
running, so it runs just like any other GUI app?
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Any one have some GOOD (maybe GREAT) documentation or links for Win32 GUI?
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Path in your autoexec.bat file?
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: rabs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 18, 2002 3:32 PM
Subject: I cant run perl from the dos command line
I am running
First thing I would do is check the permissions of the .forward file. It
has to be VERY specific. I wish I remembered what it was..
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Lysander [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent
Is there a way with Net::Telnet that I can read data and send data
simultaneously? Or how about capturing the data that comes in to a
variable?
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Hanson, Robert [EMAIL PROTECTED]
To: 'Oktay Ahmed
Ok, thanks. But now you've made me curious about fork..
You can make the two processes of a fork talk to each other? How? I've
tried setting a variable in the child and printing in the parent, but that
didn't work.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
Try doing away with the second line, and leave a blank space instead. It's
weird, but it happens to me sometimes, too.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Naveen Parmar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday
I use require 'scripts/lib/pollstarpm' for often used functions in most of
my scripts. The question is this.. do I always have to declare require
near the top or can I require only when I need it? If so, what happens if
I require during a subroutine?
As always, many thanks.
Agustin Rivera
Is there a postgres pg.pm module available for Windows? I can't seem to
locate one for anything other than *nixes.
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
open(IN, test) or die $!;
$line=IN;
close(IN);
print $line;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Yacketta, Ronald [EMAIL PROTECTED]
To: Beginners (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 7:50 AM
Subject: pull line
open(FIRST, $firstfile) or die $!;
open(SECOND, $secondfile) or die $!;
@first=FIRST;
@second=SECOND;
foreach $first_line(@first)
{
foreach $second_line(@second)
{
chomp($first_line); chomp($second_line);
print $first_line$second_line\n;
}
}
Agustin Rivera
Webmaster
Homework Perl assignments? Where can I sign-up for that? :D
Personally, I learn far better by example than documentation. That's why I
signed up for this group.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Casey West [EMAIL PROTECTED
I'm not too sure I understand, but if you want to resume after calling die,
then don't call die. Why not put print Here's an exception. Or,
determine if the error is fatal and set fatal=1, if not fatal=0. Then die
if fatal=1;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
scripts
over to it? Right now our setup is Apache w/modperl, and I'm getting quite
good at taking advantage of modperl's benefits.
Hope everyone had a safe New Year,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Try
while () { -- change
my $num = $_; -- change
chop $num;
next if(!($num=~m/(^([0-9]+)$)/));
$sum=$sum+$num;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Mariana AƱez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday
.
3) This code could very well last 5 years.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Roger C Haslock [EMAIL PROTECTED]
To: Agustin Rivera [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 02, 2002 11:44 AM
Subject: Re: C vs
$count=length($var);
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Mark Mclogan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 28, 2001 10:31 AM
Subject: count the number of characters
Hi! question.
I get a variable
Easiest way is to do
print Hit Y to continue: [N];
$input = STDIN;
if ($input =~ /y/i) {print this way anything but Y or y will get
ignored\n;}
Also, if you just want Y and them to not have to hit ENTER, too, try using
getc.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
I could of swore I saw a message about some Perl module that outputs
pretty, properly indented HTML. I can't find the message in my email
client, so if anyone could help me, I'd be very grateful.
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e
I can't think of how much of my life I've wasted because I didn't know about
splain.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Michael Fowler [EMAIL PROTECTED]
To: Chris Zampese [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday
If this is all you want your script to do, I suggest using this command
tail -n1 filename
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: James Kelty [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 18, 2001 10:21 AM
Subject
In that case, do this..
open(IN, filename);
@file=IN;
print $file[$#file]\n;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: James Kelty [EMAIL PROTECTED]
To: Agustin Rivera [EMAIL PROTECTED]
Sent: Tuesday, December 18, 2001 10:27 AM
Subject
I've never had an instance where that didn't work. I use for $a(0..$#array)
loops in almost all of my scripts.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: James Kelty [EMAIL PROTECTED]
To: Agustin Rivera [EMAIL PROTECTED]; [EMAIL
You are right. I would suggest going with Smoot Carl-Mitchell's suggestion.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Etienne Marcotte [EMAIL PROTECTED]
To: Agustin Rivera [EMAIL PROTECTED]
Cc: James Kelty [EMAIL PROTECTED]; [EMAIL
I've sent you a private message with a script. I didn't think it would be
appropriate to post that much code to the list.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: jeff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 17
$htmlfile=~ s/INSERTTEXT/$text/g;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Jack Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 17, 2001 10:13 AM
Subject: Insert text in HTML page...
Hello to all! Somebody could say
print $#array;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Ryan Guy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 17, 2001 12:24 PM
Subject: Array Length.
I need to know the fastest way to determine a length
I can't honestly say I understand everything your code is trying to do, but
on my Linux box I just run this script..
#!/usr/bin/perl
chomp($user=shift(@ARGV));
die No user specified at bash i.e. ./adduser.pl username\n if $user eq ;
system(/usr/sbin/adduser $user);
Agustin Rivera
Webmaster
), the
gzip file becomes corrupt. Is there anything I can do to repair the file?
Specifically, when bad things happen, I get a gunzip: log.gz: unexpected
end of file error.
Again, many thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
p.s. My problems with mod_perl have been
Well, besides escaping the periods, you also have it backwards. It should
be
open(Workflow, workflow.txt) || die $!;
Unless someone knows something I don't..but I couldn't get it to work your
way.
Regards,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message
I am under the idea that modperl recycles as many variables as possible to
speed up script processing. I don't want it to recycle variables in some
scripts (in particular, ones I haven't written and have no desire to debug).
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
...
use vars qw($template $file $cache $cachefile); would stop mod_perl from
recycling those variables. At least, thats what the local Linux guru told
me.
Thanks to everyone helping me out. It's time to do some reading...
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
to them. Most of our
employees are not able to make sense of the gibberish sent back from the
mail servers. The gibberish-to-english translation is being left up to me.
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED
64 matches
Mail list logo