Re: HELP with accessing HTML page to automate Login using HTML::Form

2001-12-17 Thread Greg Meckes
With a 501, it sound like the server may not be set up for https: DESCR: The Web server does not support the functionality required to fulfill the request. Please check you URL for errors, and contact the Web server's administrator if the problem persists. Otherwise, you should try the LWP mo

Re: Using CGI locally

2001-11-29 Thread Greg Meckes
Yes, you can download Apache and install it. You then can install Perl (if it's not installed with Apache) and run CGI scripts on your box like any web server. Greg --- Clive Lansink <[EMAIL PROTECTED]> wrote: > I know that when I call up a local HTML file from within Internet Explorer it works

Re: print chomp

2001-11-29 Thread Greg Meckes
How about: print reverse(chomp @lines = ); ? Greg --- Sukhpreet Singh <[EMAIL PROTECTED]> wrote: > Why can't I do this? > > print chomp reverse(@lines = ); > > or > > print chomp(reverse(@lines = )); > > I get > > Can't modify reverse in chomp at ex3-1.pl line 3, near "))" > Execution of e

Re: Array problems!

2001-11-13 Thread Greg Meckes
Maybe try: open(MYFILE, $match) || die "Can't open file: $!"; my @filelist = ; close(MYFILE); chomp @filelist; foreach (@filelist) { find \&wanted($_), "."; } sub wanted { my $File = shift; print "Match found at : $File::Find::name\n" if $File; } For the $b array just: while (defined($b=

Re: Perl with Java

2001-11-03 Thread Greg Meckes
We use Perl and Java in our shop. I'm the Perl guy and I haven't encountered any situation where I couldn't code up something to do same thing that the Java apps do. That's not to bring into it any 'preference' of one language over the other as they both have their usability goods and bads. We

Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-18 Thread Greg Meckes
Suggested reply (add content at will): Dear admissions counselor, Thanks for taking the time to review my question. Your response suggests that your experience with Perl, or programming with it may not be well informed as the higher level advanced data structures you refer to: files, records are

Re: last line

2001-07-27 Thread Greg Meckes
--- COLLINEAU Franck FTRD/DMI/TAM <[EMAIL PROTECTED]> wrote: > Hi! > > How can i do to delete the last line of a file ? > > Thanks > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Try: #Get the data open(FILE, $file) or die "Couldn't o

Re: HTTP::Request get or post??

2001-07-21 Thread Greg Meckes
--- Will Muir <[EMAIL PROTECTED]> wrote: > > Here is a quick one, when using HTTP::Request to get data from a website how do I if >I should > use get or post to receive that content of the site. I am pretty new to this so >please be > gentle. > > Thanks in advance > > will > If your just t

Re: string position

2001-07-05 Thread Greg Meckes
You can try: $test = "abcd"; $test = sprintf "%24s" , $test; Greg __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/

Re: Cannot get a connect to Mysql using DBI !!!!!!!!!!!

2001-06-20 Thread Greg Meckes
This might help: http://www.mysql.com/doc/C/a/Can_not_connect_to_server.html Greg --- "Derrick (Thrawn01)" <[EMAIL PROTECTED]> wrote: > Cannot get a connect to Mysql using DBI > I get these error messages > > DBI->connect([EMAIL PROTECTED]:3306) failed: Can't connect to MySQL > server > on '330

Re: Update: Where to begin??!!??

2001-06-15 Thread Greg Meckes
Well, it may not be necessary in that context, but I always escape them as they've sometimes caused headaches for me in the past. Greg --- Dave Cross <[EMAIL PROTECTED]> wrote: > On Fri, Jun 15, 2001 at 01:33:30PM -0700, Greg Meckes ([EMAIL PROTECTED]) wrote: > > First :

RE: Update: Where to begin??!!??

2001-06-15 Thread Greg Meckes
$_ is the default variable. It represents each line and assigns it to $_ . Actually, you don't even need it. You can try: split (/|/); greg --- Crystal Gruetzmacher <[EMAIL PROTECTED]> wrote: > what is $_ for? > > -Original Message- > From: Greg Meckes [

Re: Update: Where to begin??!!??

2001-06-15 Thread Greg Meckes
First : Your assigning a newline to the "$/" scalar: $/ = "\n"; Why? Get rid of it. Second: The split: split (/|/, $/); Should be : split (/\|/, $_); Third: You should escape the pipes in the print statement: "$date|$time|$name|$street|etc"; Should be: |$date\|$time\|$name\|$street\|etc"

Re: Where to begin??!!??

2001-06-15 Thread Greg Meckes
try: open(DAT, "file.dat") or die "Couldn't open the file: $!\n"; @DAT = ; close(DAT); #write to file open (OUT, ">out.dat") or die "Couldn't open the file: $!\n"; foreach my $Line(@DAT) { chomp $Line; #remove first pipe $Lines =~ s/\|//; my ($date,$time,$name,$street,$town,$state ,$zip,$coun

Re: a trivial problem...

2001-06-03 Thread Greg Meckes
Well you could do it this way, if you're trying to read each line and process the same way (Assuming you only want lines starting with Nitrogen, and the lines are all structured the same): ## START while(){ if (/^Nitrogen/) { @List = split (/\s+/); if ($List[1] <= 0.0) {

Re: Problem with reading string from commandline

2001-05-03 Thread Greg Meckes
Couldn't you just do something simple like: #at your "for" loop for ($t=0;$t<$z;$t++) { #Insert this $zin[$t] =~ s/\[//g; #Remove left bracket $zin[$t] =~ s/\]//g; #Remove right bracket #End insert #And continue with the rest... if ($zin[$t] eq "212.104.202.50") { #etc ### It'll

Re: eliminating duplicate lines in a file

2001-05-02 Thread Greg Meckes
You can try this old trick: # where @data is from flatfile %seen = (); @uniq = (); #will contain only unique elements foreach $item(@data) { unless($seen{$item}) { $seen{$item} = 1; if ($item =~ /\S+/g) { push(@uniq,

Re: I am a real begginer to perl......

2001-05-02 Thread Greg Meckes
#open file for reading open (READ, "file2.txt"); # you'll then have to loop through # the READ file with a foreach loop # or a while loop to perform # "various commands" while () { #perform command # Then write to the file print WRITE "$value\n"; } close(READ); close(WRITE); Greg

Re: Problem with reading string

2001-05-01 Thread Greg Meckes
In your statements: print "@zin[$i] \n\r"; You should use: print "$zin[$i] \n\r"; And: > $ta = @zin[6]; > $tb = @zin[7]; > $tc = @zin[8]; > $td = @zin[9]; should be: > $ta = $zin[6]; > $tb = $zin[7]; > $tc = $zin[8]; > $td = $zin[9]; And: if (@zin[$t] = /212.104.202.50/g) { Should be: if ($z

Re: Strange chop behaviour

2001-05-01 Thread Greg Meckes
chomp removes only the newline (what you want I think) and chop removes the last character #instead of chop $in; #Try: chomp $in; Greg __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: What does 'variable not imported' warning mean?

2001-04-29 Thread Greg Meckes
Here's a passage from the error message doc that can be found at: http://www.perl.com/pub/doc/manual/html/pod/perldiag.html Variable "%s" is not imported%s (F) While ``use strict'' in effect, you referred to a global variable that you apparently thought was imported from another module, because

Re: Problem with Forms

2001-04-26 Thread Greg Meckes
I would try altering your loop and rewrite it like so: #!/usr/bin/perl require("cgi-lib.pl"); print "Content-type: text/html\n\n"; $header = "/usr/home/m/ma/mayline/mayline.com/testnav.html"; unless(open(DAT, "../pricelist.db")) { die, "Cannot Open File: pricelist.db" }; @data = ; close(DAT); pr

Re: What is a "case shell"?

2001-04-24 Thread Greg Meckes
I'm sure it's ksh (k shell - Unix). The person placing the ad probably dictated to the person who actually put the ad in and misunderstood. -g __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/