getting those \r\n out -

2002-05-21 Thread drieux


since i wanted to hang the demo on how to pack Params
as paragraphs - also took the side adventure to show
how '\r' is dealt with on mac and linux boxes - so
you can clean them out of the input stream before going on.

http://www.wetware.com/drieux/pbl/cgi/ParseParmsToPara.txt


ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: which character did not meet the requirements of the regex

2002-05-21 Thread drieux


On Monday, May 20, 2002, at 11:22 , David vd Geer Inhuur tbv IPlib wrote:

> $icname = "123qwerty&";

quotes interpolate - single quotes do not;

try

my $allow='A-Za-z0-9_.';# what we allow

my $icname = '1+23|qwerty&';

if (!($icname =~ /^[$allow]+$/)) {
print "your IP-Block name cannot contain special characters\n";
print "we do not like <$1> \n" while ( $icname =~ m/([^$allow])/g);
}

once we know what we allow - then [^$allow] is everything else
one char at a time

and I believe you will get

your IP-Block name cannot contain special characters
we do not like <+>
we do not like <|>
we do not like <&>

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: getting those \r\n out -

2002-05-21 Thread John Brooking

--- drieux <[EMAIL PROTECTED]> wrote:
>  ...
>
http://www.wetware.com/drieux/pbl/cgi/ParseParmsToPara.txt
> 
> 
> ciao
> drieux

Thanks to all who contributed to this thread. Here's
what I finally ended up using, incorporating several
of your suggestions (HTML tags in code):

my $eol = chr(13) . chr(10);   # Test CR/LF
combination
#my $eol = chr(13); # Test CR alone
#my $eol = chr(10); # Test LF alone
my $Text = "Para.${eol}Para.${eol}Para.";
if( $Text =~ m/\x0d/ ) {
   $Text =~ s/\x0a//g;
   $Text =~ s/\x0d/<\/p>/g;
}
else {
   $Text =~ s/\x0a/<\/p>/g;
}
$Text = "$Text";
print $Text;

(Again, this is just my test program. The ultimate
intent is to get the input from a TEXTAREA tag in CGI
POST data, replace the newlines with P tags, and
present it on an HTML page as well as be able
translate it back to the newlines for further editting
in a TEXTAREA.)

This wraps the paragraph begin and end tags around
each paragraph, which is the official way of doing it,
rather than just using the begin tag as I initially
was doing. I could have also just replaced newlines
with BR tags, but again that seemed like "cheating".

I coded to allow for all variations of end-of-line,
since despite the post about getting CR/LF on Linux, I
didn't think I could assume this would always be the
case. I couldn't find the issue addressed at all on
the official W3 HTML 4.01 spec
(http://www.w3.org/TR/html4/interact/forms.html#h-17.7).
In fact, that document didn't even address the WRAP
attribute, maybe that is deprecated or a non-standard
addition? On IRT.ORG
(http://tech.irt.org/articles/js216/index10.htm),
there is a discussion which implies that the character
may indeed vary between operating systems. Did they
test this before printing it? Maybe, maybe not, but
I'd rather be safe and handle the possibility.

Thanks again to everyone.

- John


=
"When you're following an angel, does it mean you have to throw your body off a 
building?" - They Might Be Giants, http://www.tmbg.com

Word of the week: Serendipity, see http://www.bartleby.com/61/93/S0279300.html

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: opening and printing a document?

2002-05-21 Thread John Brooking

--- Octavian Rasnita <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I know how to open and print an html or text
> document on the screen if the
> file is on my site and I know the real path to the
> file.
> I want to open and print a document on the screen
> but it is not on my site
> and of course, I don't know the real path to that
> file.

If this is in the context of presenting information
back to a browser, is it sufficient to just do a
redirect to the URL (see perldoc CGI)? A redirect does
basically what you are asking, gets a file at a URL
and prints it to the screen. I'm assuming that there
is a reason you can't just use a plain link from a
page, such as you need a script to construct the URL
at "run-time"?

If your situation is a little more complicated than
that, what you may want is the LWP::UserAgent module
(see perldoc LWP::UserAgent). This will also require
HTTP::Request and HTTP::Headers. This allows your
script to request a document at a URL and get back the
response in an object variable, which you can then do
whatever you want with, such as print it or parse it.

- John


=
"When you're following an angel, does it mean you have to throw your body off a 
building?" - They Might Be Giants, http://www.tmbg.com

Word of the week: Serendipity, see http://www.bartleby.com/61/93/S0279300.html

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Translating newlines to HTML paragraphs

2002-05-21 Thread Bob Showalter

> -Original Message-
> From: Jake [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 20, 2002 5:18 PM
> To: John Brooking; Beginners CGI
> Subject: Re: Translating newlines to HTML paragraphs
> 
> ... My guess though is that textarea newlines will get sent 
> as cr/lf no matter what OS the client is running.

This is dependent on the browser, and not the client OS. The
HTML standard would be controlling here, and it's pretty
vague if you look at the TEXTAREA section. The discussion of
line breaks in general starts at:



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Translating newlines to HTML paragraphs

2002-05-21 Thread Felix Geerinckx

on Tue, 21 May 2002 12:35:59 GMT, [EMAIL PROTECTED] (Bob 
Showalter) wrote:

> This is dependent on the browser, and not the client OS. The
> HTML standard would be controlling here, and it's pretty
> vague if you look at the TEXTAREA section. 

It was somewhat less vague in the 'HTML 3.2 Reference Specification':

From



TEXTAREA multi-line text fields
[...]
It is recommended that user agents canonicalize line endings to CR,   
LF (ASCII decimal 13, 10) when submitting the field's contents. The 
character set for submitted data should be ISO Latin-1, unless the 
server has previously indicated that it can support alternative 
character sets. 

-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Netscape vs. IE Discrepancy

2002-05-21 Thread Phil Fickas

HI,
 
I'm creating a CGI script in perl for my web page.  When I bring it up in IE
6 it displays beautifully, however, if I open it in Netscape 6, the cgi
script runs but Netscape, instead of showing the web page, shows the text of
the page (the html code) that my CGI script produced with the correct data
nonetheless.  I can't figure out why the discrepancy between IE and
Netscape.
 
For a little more background, I HAVE printed out the appropriate lines:
 

print "Content-type: text/html\n\n";
print "\n";
print "\n";

 
and Netscape even shows the appropriate HTML including the  tag.  I
just can't understand why Netscape won't parse my html and then display the
web page.
 
 
Thanks,
 
Phil



RE: Netscape vs. IE Discrepancy

2002-05-21 Thread Joel Hughes

is this URL externall visible so we can look at it?

Failing that can you copy in your EXACT code please?

have you ran through a proxy (such as http sniffer) so you can see exactly
the HTTP conversation that takes place?

It sure as heck looks like NS is being stricter about processing the
header/mime type etc.

joel


-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2002 14:07
To: '[EMAIL PROTECTED]'
Subject: Netscape vs. IE Discrepancy


HI,

I'm creating a CGI script in perl for my web page.  When I bring it up in IE
6 it displays beautifully, however, if I open it in Netscape 6, the cgi
script runs but Netscape, instead of showing the web page, shows the text of
the page (the html code) that my CGI script produced with the correct data
nonetheless.  I can't figure out why the discrepancy between IE and
Netscape.

For a little more background, I HAVE printed out the appropriate lines:

.
print "Content-type: text/html\n\n";
print "\n";
print "\n";
.

and Netscape even shows the appropriate HTML including the  tag.  I
just can't understand why Netscape won't parse my html and then display the
web page.


Thanks,

Phil



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: opening and printing a document?

2002-05-21 Thread Scot Robnett

How about using LWP?

# Create a new agent object
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->agent("SomeAgentName/0.1 " . $ua->agent);

# Create a request (HTTP,FTP,File)
my $req = new HTTP::Request GET => 'http://www.insiteful.tv';

# Pass request to the user agent and get response
my $res = $ua->request($req);

# Check the outcome of the response
if ($res->is_success) {
 print $res->content;
}
else {
 print "Sorry, no luck. \n";
}


Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 20, 2002 10:44 AM
To: [EMAIL PROTECTED]
Subject: opening and printing a document?


Hi all,

I know how to open and print an html or text document on the screen if the
file is on my site and I know the real path to the file.
I want to open and print a document on the screen but it is not on my site
and of course, I don't know the real path to that file.

I've seen that I need the real path if I want to use:

open (FILE, "$path");

while() {
print $_;
}

Do I have another solution?

Thank you.
Teddy,
[EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Netscape vs. IE Discrepancy

2002-05-21 Thread Scot Robnett

It is possible that you are printing the HTML header twice, although I can't
tell because we can't see the rest of your code. Exploder actually handles
that situation a little more gracefully than Netscape if that is indeed your
case...I can't tell based on the info provided though. Make sure that if you
are using CGI.pm, you don't call something like

$q->header;

and then stick

print "Content-type: text/html\n\n";

in there too. If you post more detail it would help.


Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:07 AM
To: '[EMAIL PROTECTED]'
Subject: Netscape vs. IE Discrepancy


HI,

I'm creating a CGI script in perl for my web page.  When I bring it up in IE
6 it displays beautifully, however, if I open it in Netscape 6, the cgi
script runs but Netscape, instead of showing the web page, shows the text of
the page (the html code) that my CGI script produced with the correct data
nonetheless.  I can't figure out why the discrepancy between IE and
Netscape.

For a little more background, I HAVE printed out the appropriate lines:

.
print "Content-type: text/html\n\n";
print "\n";
print "\n";
.

and Netscape even shows the appropriate HTML including the  tag.  I
just can't understand why Netscape won't parse my html and then display the
web page.


Thanks,

Phil

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: which character did not meet the requirements of the regex

2002-05-21 Thread David Gray

>   if (!($icname =~ /^[$allow]+$/)) {
>   print "your IP-Block name cannot contain special characters\n";
>   print "we do not like <$1> \n" while ( $icname 
> =~ m/([^$allow])/g);
>   }

You could use the !~ operator to negate this automatically and print it
in a one-shot, like so:

 if($icname !~ /^[$allow]+$/) {
   my @invalid = ();
   push @invalid, $1
 while $icname =~ m/([^$allow])/g;
   print "your IP-Block name cannot contain special characters\n";
   print "we do not like [@invalid]\n";
 }

Cheers,

 -dave



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Netscape vs. IE Discrepancy FIXED

2002-05-21 Thread Phil Fickas

Hi all.

Thanks for the sanity check.  I was printing a line of debugging before the
content-type output line.  Commenting that out fixed it.  IE was smart
enough to ignore it, while Netscape preferred to reject the page.

Thanks again,

Phil


-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 21, 2002 9:37 AM
To: Phil Fickas; [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy

It is possible that you are printing the HTML header twice, although I can't
tell because we can't see the rest of your code. Exploder actually handles
that situation a little more gracefully than Netscape if that is indeed your
case...I can't tell based on the info provided though. Make sure that if you
are using CGI.pm, you don't call something like

$q->header;

and then stick

print "Content-type: text/html\n\n";

in there too. If you post more detail it would help.


Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:07 AM
To: '[EMAIL PROTECTED]'
Subject: Netscape vs. IE Discrepancy


HI,

I'm creating a CGI script in perl for my web page.  When I bring it up in IE
6 it displays beautifully, however, if I open it in Netscape 6, the cgi
script runs but Netscape, instead of showing the web page, shows the text of
the page (the html code) that my CGI script produced with the correct data
nonetheless.  I can't figure out why the discrepancy between IE and
Netscape.

For a little more background, I HAVE printed out the appropriate lines:

.
print "Content-type: text/html\n\n";
print "\n";
print "\n";
.

and Netscape even shows the appropriate HTML including the  tag.  I
just can't understand why Netscape won't parse my html and then display the
web page.


Thanks,

Phil

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Netscape vs. IE Discrepancy FIXED

2002-05-21 Thread Scot Robnett

That depends on how you look at it...Netscape was the browser that actually
forced your hand to clean up the code, so which browser was smarter? :)

Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:53 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Netscape vs. IE Discrepancy FIXED


Hi all.

Thanks for the sanity check.  I was printing a line of debugging before the
content-type output line.  Commenting that out fixed it.  IE was smart
enough to ignore it, while Netscape preferred to reject the page.

Thanks again,

Phil


-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 9:37 AM
To: Phil Fickas; [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy

It is possible that you are printing the HTML header twice, although I can't
tell because we can't see the rest of your code. Exploder actually handles
that situation a little more gracefully than Netscape if that is indeed your
case...I can't tell based on the info provided though. Make sure that if you
are using CGI.pm, you don't call something like

$q->header;

and then stick

print "Content-type: text/html\n\n";

in there too. If you post more detail it would help.


Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:07 AM
To: '[EMAIL PROTECTED]'
Subject: Netscape vs. IE Discrepancy


HI,

I'm creating a CGI script in perl for my web page.  When I bring it up in IE
6 it displays beautifully, however, if I open it in Netscape 6, the cgi
script runs but Netscape, instead of showing the web page, shows the text of
the page (the html code) that my CGI script produced with the correct data
nonetheless.  I can't figure out why the discrepancy between IE and
Netscape.

For a little more background, I HAVE printed out the appropriate lines:

..
print "Content-type: text/html\n\n";
print "\n";
print "\n";
..

and Netscape even shows the appropriate HTML including the  tag.  I
just can't understand why Netscape won't parse my html and then display the
web page.


Thanks,

Phil

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Netscape vs. IE Discrepancy FIXED

2002-05-21 Thread aman cgiperl

Hi
As a developer I won't agree that IE is smart because it lets programmers
ignore minor mistakes.
It allows you to be a negligent programmer.
Always use netscape for testing because that's the real test. Then use IE -
that's what the most of the world uses after all!!!
Thanks
Aman

- Original Message -
From: "Phil Fickas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 8:53 AM
Subject: RE: Netscape vs. IE Discrepancy FIXED


> Hi all.
>
> Thanks for the sanity check.  I was printing a line of debugging before
the
> content-type output line.  Commenting that out fixed it.  IE was smart
> enough to ignore it, while Netscape preferred to reject the page.
>
> Thanks again,
>
> Phil

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Netscape vs. IE Discrepancy FIXED

2002-05-21 Thread Joel Hughes

Scot's right Phil, IE wasn't being 'smarter' it was being 'slacker'

:-)

joel

-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2002 15:11
To: Phil Fickas; [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy FIXED


That depends on how you look at it...Netscape was the browser that actually
forced your hand to clean up the code, so which browser was smarter? :)

Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:53 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Netscape vs. IE Discrepancy FIXED


Hi all.

Thanks for the sanity check.  I was printing a line of debugging before the
content-type output line.  Commenting that out fixed it.  IE was smart
enough to ignore it, while Netscape preferred to reject the page.

Thanks again,

Phil


-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 9:37 AM
To: Phil Fickas; [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy

It is possible that you are printing the HTML header twice, although I can't
tell because we can't see the rest of your code. Exploder actually handles
that situation a little more gracefully than Netscape if that is indeed your
case...I can't tell based on the info provided though. Make sure that if you
are using CGI.pm, you don't call something like

$q->header;

and then stick

print "Content-type: text/html\n\n";

in there too. If you post more detail it would help.


Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:07 AM
To: '[EMAIL PROTECTED]'
Subject: Netscape vs. IE Discrepancy


HI,

I'm creating a CGI script in perl for my web page.  When I bring it up in IE
6 it displays beautifully, however, if I open it in Netscape 6, the cgi
script runs but Netscape, instead of showing the web page, shows the text of
the page (the html code) that my CGI script produced with the correct data
nonetheless.  I can't figure out why the discrepancy between IE and
Netscape.

For a little more background, I HAVE printed out the appropriate lines:

...
print "Content-type: text/html\n\n";
print "\n";
print "\n";
...

and Netscape even shows the appropriate HTML including the  tag.  I
just can't understand why Netscape won't parse my html and then display the
web page.


Thanks,

Phil

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Netscape vs. IE Discrepancy FIXED

2002-05-21 Thread Phil Fickas

Yea, I see that.  I'm still hitting my self over here after realizing that I
called a Microsoft product "smart"...:-(

--Phil

-Original Message-
From: Joel Hughes [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 21, 2002 10:18 AM
To: [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy FIXED

Scot's right Phil, IE wasn't being 'smarter' it was being 'slacker'

:-)

joel

-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2002 15:11
To: Phil Fickas; [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy FIXED


That depends on how you look at it...Netscape was the browser that actually
forced your hand to clean up the code, so which browser was smarter? :)

Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:53 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Netscape vs. IE Discrepancy FIXED


Hi all.

Thanks for the sanity check.  I was printing a line of debugging before the
content-type output line.  Commenting that out fixed it.  IE was smart
enough to ignore it, while Netscape preferred to reject the page.

Thanks again,

Phil


-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 9:37 AM
To: Phil Fickas; [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy

It is possible that you are printing the HTML header twice, although I can't
tell because we can't see the rest of your code. Exploder actually handles
that situation a little more gracefully than Netscape if that is indeed your
case...I can't tell based on the info provided though. Make sure that if you
are using CGI.pm, you don't call something like

$q->header;

and then stick

print "Content-type: text/html\n\n";

in there too. If you post more detail it would help.


Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:07 AM
To: '[EMAIL PROTECTED]'
Subject: Netscape vs. IE Discrepancy


HI,

I'm creating a CGI script in perl for my web page.  When I bring it up in IE
6 it displays beautifully, however, if I open it in Netscape 6, the cgi
script runs but Netscape, instead of showing the web page, shows the text of
the page (the html code) that my CGI script produced with the correct data
nonetheless.  I can't figure out why the discrepancy between IE and
Netscape.

For a little more background, I HAVE printed out the appropriate lines:


print "Content-type: text/html\n\n";
print "\n";
print "\n";


and Netscape even shows the appropriate HTML including the  tag.  I
just can't understand why Netscape won't parse my html and then display the
web page.


Thanks,

Phil

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Netscape vs. IE Discrepancy FIXED

2002-05-21 Thread Joel Hughes

maybe you meant 'smart' as in the 'smart missile - really distructive'
sense?

joel


-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2002 15:27
To: '[EMAIL PROTECTED]'
Subject: RE: Netscape vs. IE Discrepancy FIXED


Yea, I see that.  I'm still hitting my self over here after realizing that I
called a Microsoft product "smart"...:-(

--Phil

-Original Message-
From: Joel Hughes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 10:18 AM
To: [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy FIXED

Scot's right Phil, IE wasn't being 'smarter' it was being 'slacker'

:-)

joel

-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2002 15:11
To: Phil Fickas; [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy FIXED


That depends on how you look at it...Netscape was the browser that actually
forced your hand to clean up the code, so which browser was smarter? :)

Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:53 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Netscape vs. IE Discrepancy FIXED


Hi all.

Thanks for the sanity check.  I was printing a line of debugging before the
content-type output line.  Commenting that out fixed it.  IE was smart
enough to ignore it, while Netscape preferred to reject the page.

Thanks again,

Phil


-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 9:37 AM
To: Phil Fickas; [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy

It is possible that you are printing the HTML header twice, although I can't
tell because we can't see the rest of your code. Exploder actually handles
that situation a little more gracefully than Netscape if that is indeed your
case...I can't tell based on the info provided though. Make sure that if you
are using CGI.pm, you don't call something like

$q->header;

and then stick

print "Content-type: text/html\n\n";

in there too. If you post more detail it would help.


Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:07 AM
To: '[EMAIL PROTECTED]'
Subject: Netscape vs. IE Discrepancy


HI,

I'm creating a CGI script in perl for my web page.  When I bring it up in IE
6 it displays beautifully, however, if I open it in Netscape 6, the cgi
script runs but Netscape, instead of showing the web page, shows the text of
the page (the html code) that my CGI script produced with the correct data
nonetheless.  I can't figure out why the discrepancy between IE and
Netscape.

For a little more background, I HAVE printed out the appropriate lines:

.
print "Content-type: text/html\n\n";
print "\n";
print "\n";
.

and Netscape even shows the appropriate HTML including the  tag.  I
just can't understand why Netscape won't parse my html and then display the
web page.


Thanks,

Phil

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Netscape vs. IE Discrepancy FIXED

2002-05-21 Thread Phil Fickas

Actually I was using an old, forgotten meaning of smart "To cause a sharp,
usually superficial, stinging pain."  (without realizing it, of course :-)

http://www.dictionary.com/search?q=smart

1. To cause a sharp, usually superficial, stinging pain
2. To suffer acutely, as from mental distress, wounded feelings, or remorse 
3. To suffer or pay a heavy penalty.

(they all seem to apply)

--Phil

-Original Message-
From: Joel Hughes [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 21, 2002 10:30 AM
To: [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy FIXED

maybe you meant 'smart' as in the 'smart missile - really distructive'
sense?

joel


-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2002 15:27
To: '[EMAIL PROTECTED]'
Subject: RE: Netscape vs. IE Discrepancy FIXED


Yea, I see that.  I'm still hitting my self over here after realizing that I
called a Microsoft product "smart"...:-(

--Phil

-Original Message-
From: Joel Hughes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 10:18 AM
To: [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy FIXED

Scot's right Phil, IE wasn't being 'smarter' it was being 'slacker'

:-)

joel

-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2002 15:11
To: Phil Fickas; [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy FIXED


That depends on how you look at it...Netscape was the browser that actually
forced your hand to clean up the code, so which browser was smarter? :)

Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:53 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Netscape vs. IE Discrepancy FIXED


Hi all.

Thanks for the sanity check.  I was printing a line of debugging before the
content-type output line.  Commenting that out fixed it.  IE was smart
enough to ignore it, while Netscape preferred to reject the page.

Thanks again,

Phil


-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 9:37 AM
To: Phil Fickas; [EMAIL PROTECTED]
Subject: RE: Netscape vs. IE Discrepancy

It is possible that you are printing the HTML header twice, although I can't
tell because we can't see the rest of your code. Exploder actually handles
that situation a little more gracefully than Netscape if that is indeed your
case...I can't tell based on the info provided though. Make sure that if you
are using CGI.pm, you don't call something like

$q->header;

and then stick

print "Content-type: text/html\n\n";

in there too. If you post more detail it would help.


Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-Original Message-
From: Phil Fickas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:07 AM
To: '[EMAIL PROTECTED]'
Subject: Netscape vs. IE Discrepancy


HI,

I'm creating a CGI script in perl for my web page.  When I bring it up in IE
6 it displays beautifully, however, if I open it in Netscape 6, the cgi
script runs but Netscape, instead of showing the web page, shows the text of
the page (the html code) that my CGI script produced with the correct data
nonetheless.  I can't figure out why the discrepancy between IE and
Netscape.

For a little more background, I HAVE printed out the appropriate lines:

..
print "Content-type: text/html\n\n";
print "\n";
print "\n";
..

and Netscape even shows the appropriate HTML including the  tag.  I
just can't understand why Netscape won't parse my html and then display the
web page.


Thanks,

Phil

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Netscape vs. IE Discrepancy FIXED

2002-05-21 Thread Camilo Gonzalez

Okay, can we stop this now? If you really want to test your code, try
Mozilla.

I've got a couple of questions. First, how do I untaint data when I want to
open a filehandle?

Secondly, I have this inside an if conditional inside a foreach loop
"$subject = "Sneak Preview Form Inquiry". It doesn't seem to be scoped
outside the if conditional even though I declared $subject as a global
variable. How can I scope it globally inside my script?

-Original Message-
From: Todd Wade,,,Room 108 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 9:59 AM
To: [EMAIL PROTECTED]
Subject: Re: Netscape vs. IE Discrepancy FIXED


Aman Cgiperl wrote:

> Always use netscape for testing because that's the real test. ...

I always use a html validator such as html tidy or the online validator at 
http://validator.w3.org/ so I can find errors in the html.

Its an invaluable tool for making sure your document is marked up in the 
way you say it is in the doctype declaration, which every document should 
have.

Todd W

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: which character did not meet the requirements of the regex

2002-05-21 Thread drieux


On Tuesday, May 21, 2002, at 06:43 , David Gray wrote:

>>  if (!($icname =~ /^[$allow]+$/)) {
[..]
>  if($icname !~ /^[$allow]+$/) {
[..]
>  }

personally I would have done the

unless ($icname =~ /^[$allow]+$/) {
# do ourstuff since $icname is not allowed

}

but that is more because when reading perl code I
like the 'unlessNess' tricks... and realistically
would probably have done

whineAbout($icname, $allow) unless ($icname =~ /^[$allow]+$/) ;

so that I would need maintain only the function 'whineAbout'
as a part of the generalized validation suite...

but in this case I thought it was simpler to focus in on
what David was directly looking at - and we'd cover this
distance later on in the game

ciao
drieux

---

ps: liked the

my @invalid = ();
push @invalid, $1
  while $icname =~ m/([^$allow])/g;

that I think I will steal this for elsewhere


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Translating newlines to HTML paragraphs

2002-05-21 Thread drieux


On Tuesday, May 21, 2002, at 05:58 , Felix Geerinckx wrote:

> on Tue, 21 May 2002 12:35:59 GMT, [EMAIL PROTECTED] (Bob
> Showalter) wrote:
>
>> This is dependent on the browser, and not the client OS. The
>> HTML standard would be controlling here, and it's pretty
>> vague if you look at the TEXTAREA section.
>
> It was somewhat less vague in the 'HTML 3.2 Reference Specification':

so I guess the question is - presume that it is either or
and rip them all out before proceding anyway

what I am not getting in these debates is why one should do

my $cr = chr(13);
my $lf = chr(10);
my $eol = "$cr|$lf";

as opposed to leaving it to perl as

my $eol = '\r|\n';

for tricks like:

my $pat= qr/[$eol]+/o;

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




why is this showing up in my error_log?

2002-05-21 Thread Jake

Hello all...'nuther goofy question

This bit of code...

open(outfile, ">".$pathToXML ) or die ("couldnt open xml file");
flock(outfile, 2);
print outfile $text;
close(outfile);

generates the following messages in my error_log

Unquoted string "outfile" may clash with future reserved word at 
/var/www/cgi-bin/adminWorkReport2.cgi line 66.
Unquoted string "outfile" may clash with future reserved word at 
/var/www/cgi-bin/adminWorkReport2.cgi line 67.
Unquoted string "outfile" may clash with future reserved word at 
/var/www/cgi-bin/adminWorkReport2.cgi line 69.
Unquoted string "outfile" may clash with future reserved word at 
/var/www/cgi-bin/adminWorkReport2.cgi line 70.


But this bit of code...

open(assignFile, ">".$pathToAssignNum) or die ("couldnt open assignNum.txt");
flock(assignFile, 2);
print assignFile $number;
close(assignFile);

doesnt!


wtf???

it happens even if i DONT use strict

Thanks
J-

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Translating newlines to HTML paragraphs

2002-05-21 Thread Jake


> so I guess the question is - presume that it is either or
> and rip them all out before proceding anyway

IMHO I think one should presume that it is that way...Thats why we go to the 
trouble to have standards isnt it?  so that everyone doesnt have to go around 
doing custom work for every different OS and application?

If programmers go out of their way to pick up after slackers who dont conform 
to the w3, doesnt that defeat the purpose of the w3?

take a stand, a small stand albeit, but a stand nevertheless :)

btw...does anyone know of a browser that DOESNT conform to the cr/lf for 
newlines?  Is anyone bored enough to go look?

>
> what I am not getting in these debates is why one should do
>
>   my $cr = chr(13);
>   my $lf = chr(10);
>   my $eol = "$cr|$lf";
>
> as opposed to leaving it to perl as
>
>   my $eol = '\r|\n';
>
> for tricks like:
>
>   my $pat= qr/[$eol]+/o;
>

If the latter method works, that's cool, i havent tested it.  I will admit 
that as I learn this stuff, I tend to do everything the hard way first, then 
trim it down.

Cheers
J-



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Cron alternatives?

2002-05-21 Thread Troy May

Hello,

A friend of mine has a task he wants to do daily, so I told him to check
into cron but he said he doesn't have it.  His server is running RedHat 6.1
Cartman.  I've never used cron before but I'm assuming that it is not
available to him from what he said.  Is there an alternative to cron for
servers that do not have it?

He needs to have a data file erased the first time it is wrote to every day.
But the rest of the day it will just append to it as normal.  I thought of
cron right away, but now I'm stuck since he can't go that route.  Any ideas?

Thanks in advance!


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]