Re: (-e $filename) gives Use of uninitialized value at...

2002-04-10 Thread Agustin Rivera
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

Re: Problem testing variable

2002-04-05 Thread Agustin Rivera
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

Re: converting html to text

2002-04-04 Thread Agustin Rivera
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

Re: module / driver install question

2002-04-04 Thread Agustin Rivera
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

Re: no output from the script

2002-04-01 Thread Agustin Rivera
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

Re: Equivalent Linux tool to ppm

2002-04-01 Thread Agustin Rivera
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,

Re: confused about perl and jpg

2002-03-28 Thread Agustin Rivera
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

Re: confused about perl and jpg

2002-03-28 Thread Agustin Rivera
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

Re: How do I get and save an image off of a web page

2002-03-27 Thread Agustin Rivera
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

Re: Search for a word in between words

2002-03-27 Thread Agustin Rivera
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

Re: executing filename with ~ in perl

2002-03-27 Thread Agustin Rivera
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

Re: LWP::Simple returns scalar; how to populate an array from it?

2002-03-27 Thread Agustin Rivera
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]

Re: Testing for filehandles

2002-03-27 Thread Agustin Rivera
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

Re: Testing for filehandles

2002-03-27 Thread Agustin Rivera
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

Default Input Record Separator

2002-03-26 Thread Agustin Rivera
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

Default Input Record Separator

2002-03-25 Thread Agustin Rivera
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

Re: Default Input Record Separator

2002-03-25 Thread Agustin Rivera
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

GD getBounds problem

2002-03-20 Thread Agustin Rivera
.. 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

Re: open(FILE, ) question

2002-03-20 Thread Agustin Rivera
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

Re: Win2000: how to compile to exe?

2002-03-11 Thread Agustin Rivera
, 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

Undefined subroutine

2002-03-07 Thread Agustin Rivera
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

Re: searching a large file

2002-02-28 Thread Agustin Rivera
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

Re: perl2exe

2002-02-27 Thread Agustin Rivera
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

Re: Seeking HTTP module

2002-02-27 Thread Agustin Rivera
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

Re: Writing file to Windows

2002-02-25 Thread Agustin Rivera
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

Re: Writing file to Windows

2002-02-25 Thread Agustin Rivera
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

Re: #include or similar

2002-02-25 Thread Agustin Rivera
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

Re: Writing file to Windows

2002-02-25 Thread 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

Postgres Module in Windows?

2002-02-21 Thread Agustin Rivera
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]

Size of Array

2002-02-18 Thread Agustin Rivera
[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]

Re: ignore spaces in files

2002-02-18 Thread Agustin Rivera
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

Win32::GUI - Getting rid of console Window?

2002-02-01 Thread Agustin Rivera
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]

Win32::GUI Richedit Question

2002-01-31 Thread Agustin Rivera
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]

Re: I cant run perl from the dos command line

2002-01-18 Thread Agustin Rivera
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

Re: Sendmail and PERL

2002-01-17 Thread Agustin Rivera
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

Re: SEND

2002-01-16 Thread Agustin Rivera
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

Re: SEND

2002-01-16 Thread Agustin Rivera
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

Re: Bareword

2002-01-15 Thread Agustin Rivera
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

require

2002-01-11 Thread Agustin Rivera
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

Postgres

2002-01-09 Thread 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]

Re: pull line #1 from a file

2002-01-08 Thread Agustin Rivera
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

Re: add text to a file.....Help

2002-01-08 Thread Agustin Rivera
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

Re: add text to a file.....Help

2002-01-08 Thread Agustin Rivera
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

Re: Resume after die?

2002-01-03 Thread Agustin Rivera
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

C vs. Perl

2002-01-02 Thread Agustin Rivera
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

Re: Why can't this two programs be piping?

2002-01-02 Thread Agustin Rivera
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

Re: C vs. Perl

2002-01-02 Thread Agustin Rivera
. 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

Re: count the number of characters

2001-12-28 Thread Agustin Rivera
$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

Re: Default variable for STDIN.

2001-12-20 Thread Agustin Rivera
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

HTML Cleaner-Upper Module

2001-12-19 Thread Agustin Rivera
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

Re: Global Symbols

2001-12-19 Thread Agustin Rivera
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

Re: Last line of file...

2001-12-18 Thread Agustin Rivera
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

Re: Last line of file...

2001-12-18 Thread Agustin Rivera
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

Re: Last line of file...

2001-12-18 Thread Agustin Rivera
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

Re: Last line of file...

2001-12-18 Thread Agustin Rivera
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

Re: How can I send an HTML format email using send mail

2001-12-17 Thread Agustin Rivera
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

Re: Insert text in HTML page...

2001-12-17 Thread Agustin Rivera
$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

Re: Array Length.

2001-12-17 Thread Agustin Rivera
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

Re: Not creating home dir....

2001-12-13 Thread Agustin Rivera
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

Compress:Zlib

2001-12-11 Thread Agustin Rivera
), 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

Re: help with open open function

2001-12-10 Thread Agustin Rivera
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

Re: Disable ModPerl

2001-12-07 Thread Agustin Rivera
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

Re: Disable ModPerl

2001-12-07 Thread Agustin Rivera
... 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

Perl + Procmail

2001-12-06 Thread Agustin Rivera
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