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 PR
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 1
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
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.po
Unless someone can point out why it wouldn't be better, but try using the PG
module. It's an easier to use module for Postgres and it makes it's queries
via the DBI.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "John
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:
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: <
You're right. I was thinking when I deemed 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
Your html tag is misformatted for starters.
try
print " ";
or
print " ";
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 Preston" <[
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
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]>
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]
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:
while()
{
$firstword=$middleword;
$middleword=$lastword;
$lastword=$_;
if ($firstword eq "Installation" && $lastword eq "Installation")
{
print "FOUND $middleword\n";
}
Would that work?
Regards,`
Agustin Rivera
Webmaster
item of the array
with this ...
$data=~ /src="*(.*?)( |>|")/;
The images then could be found in $1.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "Guy Davis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sen
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.pollsta
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 addit
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 PROT
Yeah, but the problem is I don't want to wait for $_ to reach the newline
before spitting out data. I want it immediately.
Much in the same way $|=1 would give me data.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "Timot
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
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:
essfully ..>
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
ur website, 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'
e 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.c
How about something like this...
open(IN, "hogfile.txt") or die $!;
while()
{
$oldestline=$line;
$line=$newestline;
$newestline=$_;
if ($line =~ "terms you want")
{
## process oldestline and newestline for more matches
}
}
Agustin Rivera
Web
Try this as a base to get the data
use strict;
use LWP::Simple;
my $add="http://www.worldofcgi.com/process.cgi?term1=hello&term2=world";; ##
after ? are gets
my $content = get($add);
print $content;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Or
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:
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: &q
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() {$data.=$_;}
close(IN)
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 River
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 R
ve to me I 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]
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" <[EM
rray is of type $array[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]
How would I keep the character (or characters) that I am splitting by?
for example,
@tags=split(/>/, $line);
I would like to keep the ">".
Appreciative,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additi
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]
erl script? Please don't suggest the Net::Telnet module instead,
because what I learn here could be used in future applications.
Appreciative,
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 li
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: <[EMA
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://w
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]
If you use backticks, Perl is waiting for a return value. Such as
$var=`echo bunchofdata`;
print $var
--
bunchofdata
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "Dean Theophilou" <[EMAIL PROTECTED]>
To: "Ag
Use the system command.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "Jim Ockers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2002 4:24 PM
Subject: running commands in bkgd
>
> I&
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 P
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 subr
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]
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" &l
open(FIRST, $firstfile) or die $!;
open(SECOND, $secondfile) or die $!;
@first=;
@second=;
foreach $first_line(@first)
{
foreach $second_line(@second)
{
chomp($first_line); chomp($second_line);
print "$first_line$second_line\n";
}
}
Agustin Rivera
open(IN, "test") or die $!;
$line=;
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:
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.co
ine module yet.
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]>
Se
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: &l
t our Perl 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 PROTE
$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
Easiest way is to do
print "Hit Y to continue: [N]";
$input = ;
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
htt
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&quo
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
-
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]>
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 River
In that case, do this..
open(IN, "filename");
@file=;
print "$file[$#file]\n";
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "James Kelty" <[EMAIL PROTECTED]>
To: "Agustin Rivera" <[EMAIL P
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, Dece
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
mlfile=~ 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
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: <[E
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/ad
), 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
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.c
er the idea that this line of code...
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
Webmaste
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.po
Is there a quick, simple command I can use to disable Modperl on all
variables in script, without having to qw' then all?
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This is a script I've been using. Not sure if I need all the definitions on
top or not...
use strict;
use LWP::Simple;
use URI::URL;
use CGI qw(header start_html end_html);
my $address="http://www.cnn.com";;
my $content = get($address);
print $content;
Regards,
Agustin R
ck 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
73 matches
Mail list logo