RE: ultimate stupidity

2001-10-05 Thread Ron Smith

Just think of the semicolons as periods to a sentence. Think of your 
thoughts in totality. After all it is a language :-).

Ron

>From: "Gary L. Armstrong" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: RE: ultimate stupidity
>Date: Fri, 5 Oct 2001 23:29:15 -0400
>
>I forget the semicolons just about every coding session. My program never
>works right the first test run because of this. I can't even blame it on 
>the
>cursor.  I'll fix it and move on, but the next day I forget them again.
>Sometimes I forget the # before my comment marking the end of an if or 
>other
>conditional block. Usually, though, it's the semicolon.
>
>-=GLA=-;
>
>-Original Message-
>From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
>Sent: Friday, October 05, 2001 11:43 AM
>To: Francesco Scaglioni
>Cc: [EMAIL PROTECTED]
>Subject: Re: ultimate stupidity
>
>
>On Fri, 5 Oct 2001, Francesco Scaglioni wrote:
>
> > Answer:
> > I had inadvertently put a space in front of the # at the beginning of
> > the #!.  The space is, of course covered by the cursor when I visit
> > the beginning of the file an I had failed to notice the implied space
> > ( implied because I could still see the # ).  Is this a record for the
> > most stupid mistake ever made?  Boy have I got much to learn.
>
>Don't feel bad -- we've all done similar things.  You know why programmers
>have flat foreheads.  Beacuse they are constantly slapping their forehead
>and going 'Doh!'
>
>Being able to admit an error (even one you think is stupid) is a good
>quality to have.
>
>-- Brett
>   http://www.chapelperilous.net/
>
>Sir, it's very possible this asteroid is not stable.
>   -- C3P0
>
>
>--
>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]
>


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




RE: ultimate stupidity

2001-10-05 Thread Gary L. Armstrong

I forget the semicolons just about every coding session. My program never
works right the first test run because of this. I can't even blame it on the
cursor.  I'll fix it and move on, but the next day I forget them again.
Sometimes I forget the # before my comment marking the end of an if or other
conditional block. Usually, though, it's the semicolon.

-=GLA=-;

-Original Message-
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 11:43 AM
To: Francesco Scaglioni
Cc: [EMAIL PROTECTED]
Subject: Re: ultimate stupidity


On Fri, 5 Oct 2001, Francesco Scaglioni wrote:

> Answer:
> I had inadvertently put a space in front of the # at the beginning of
> the #!.  The space is, of course covered by the cursor when I visit
> the beginning of the file an I had failed to notice the implied space
> ( implied because I could still see the # ).  Is this a record for the
> most stupid mistake ever made?  Boy have I got much to learn.

Don't feel bad -- we've all done similar things.  You know why programmers
have flat foreheads.  Beacuse they are constantly slapping their forehead
and going 'Doh!'

Being able to admit an error (even one you think is stupid) is a good
quality to have.

-- Brett
  http://www.chapelperilous.net/

Sir, it's very possible this asteroid is not stable.
-- C3P0


--
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: ultimate stupidity

2001-10-05 Thread Camilo Gonzalez

Yeah, don't worry about it. We're all bozos on this bus.

-Original Message-
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 10:43 AM
To: Francesco Scaglioni
Cc: [EMAIL PROTECTED]
Subject: Re: ultimate stupidity


On Fri, 5 Oct 2001, Francesco Scaglioni wrote:

> Answer:
> I had inadvertently put a space in front of the # at the beginning of
> the #!.  The space is, of course covered by the cursor when I visit
> the beginning of the file an I had failed to notice the implied space
> ( implied because I could still see the # ).  Is this a record for the
> most stupid mistake ever made?  Boy have I got much to learn.

Don't feel bad -- we've all done similar things.  You know why programmers
have flat foreheads.  Beacuse they are constantly slapping their forehead
and going 'Doh!'

Being able to admit an error (even one you think is stupid) is a good
quality to have.

-- Brett
  http://www.chapelperilous.net/

Sir, it's very possible this asteroid is not stable.
-- C3P0


-- 
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: ultimate stupidity

2001-10-05 Thread Brett W. McCoy

On Fri, 5 Oct 2001, Francesco Scaglioni wrote:

> Answer:
> I had inadvertently put a space in front of the # at the beginning of
> the #!.  The space is, of course covered by the cursor when I visit
> the beginning of the file an I had failed to notice the implied space
> ( implied because I could still see the # ).  Is this a record for the
> most stupid mistake ever made?  Boy have I got much to learn.

Don't feel bad -- we've all done similar things.  You know why programmers
have flat foreheads.  Beacuse they are constantly slapping their forehead
and going 'Doh!'

Being able to admit an error (even one you think is stupid) is a good
quality to have.

-- Brett
  http://www.chapelperilous.net/

Sir, it's very possible this asteroid is not stable.
-- C3P0


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




ultimate stupidity

2001-10-05 Thread Francesco Scaglioni

Hi,

I have just spent two hours trying to figure out why a perfectly good
script had failed!!  The old script headers error.

Answer:
I had inadvertently put a space in front of the # at the beginning of
the #!.  The space is, of course covered by the cursor when I visit
the beginning of the file an I had failed to notice the implied space
( implied because I could still see the # ).  Is this a record for the
most stupid mistake ever made?  Boy have I got much to learn.

I post this is the vain hope that it might someday save another newbie
from the same fate.

Regards to all and have a good weekend

Francesco

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




Re: Looking for a script that will "clean up" and print a page

2001-10-05 Thread Brett W. McCoy

On Fri, 5 Oct 2001, Rusty Wilson wrote:

> Changing the width of the page is not an option as
> that would "break" the interface (graphics/layout/etc)
> which were designed at 760px wide (at the customers
> reqest!) The client does not want a "narrower"
> interface.

Argh, that's one of the 7 deadly sins of web design -- hardcoding screen
widths, for surely where you want users to have a screen width of 760,
someone is going to come along with one that is 640 or 1280, and totally
break your design.  Not only that, having wide block of text is very
difficult to read -- a multi-column layout is much easier.

Oh, well, this entirely off-topic here so I'll shut up now.

-- Brett
  http://www.chapelperilous.net/

Support the Girl Scouts!
(Today's Brownie is tomorrow's Cookie!)


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




Re: Looking for a script that will "clean up" and print a page

2001-10-05 Thread Rusty Wilson

Thanks for the hint of HTML::Parser. I have received
that suggestion from several people, and I am looking
at it now.

Changing the width of the page is not an option as
that would "break" the interface (graphics/layout/etc)
which were designed at 760px wide (at the customers
reqest!) The client does not want a "narrower"
interface.

The design never called for the possbility of printing
the page being viewed - so thats how we got here
today.

Also, to save ink/toner it would be nice if the
"printed" version didn't have all the graphics of the
page.

To everyone that responsed (on and off list) - THANKS!


p.s. - if you want to see somebody else's working
example, check this out (its EXACTLY what I'm trying
to mimic):
http://www.delphiautomotive.com/news/pressReleases/pr5280-10022001

Note the button (and its affect) labeled: "Click Here
for Printable Version"

Rusty


--- fliptop <[EMAIL PROTECTED]> wrote:
> Rusty Wilson wrote:
> > 
> > DESIRED SOLUTION:
> > I would rather NOT go back and change the page
> design.
> > What I would like to do is put a link on each page
> > (press release) that says "PRINT". This link would
> > then call a cgi-bin/perl application that would
> "strip
> > out" the graphics/etc (which are forcing the page
> to
> > be too wide), and leave only the text and graphics
> > between the  and  tags.
> 
> does your statement here mean you're not willing to
> simply change the
> table widths to 640 so they fit on a page?
> 
> look into html::parser:
> 
> http://search.cpan.org/search?dist=HTML-Parser


__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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




Re: Looking for a script that will "clean up" and print a page

2001-10-05 Thread fliptop

Rusty Wilson wrote:
> 
> DESIRED SOLUTION:
> I would rather NOT go back and change the page design.
> What I would like to do is put a link on each page
> (press release) that says "PRINT". This link would
> then call a cgi-bin/perl application that would "strip
> out" the graphics/etc (which are forcing the page to
> be too wide), and leave only the text and graphics
> between the  and  tags.

does your statement here mean you're not willing to simply change the
table widths to 640 so they fit on a page?

look into html::parser:

http://search.cpan.org/search?dist=HTML-Parser

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




Re: Win32 & UNIX Webserver issue

2001-10-05 Thread Stephan Tinnemeyer

Shannon Murdoch wrote:
> 
> Is there any common issues that I should be aware of in regards to
> Win32/unix compatibility in my scripts?
> 

1. case sensivity

2. read, write and execution rights (-> chmod)

Shannon,

you are very unspecific. Your problem does not have to be a Win/Unix
issue. Check the paths, at least the one to perl!

Cheers

Stephan
-- 
Dipl.-Chem. Stephan Tinnemeyer
Lindenallee 20
24105 Kiel
Germany

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




Re: MacPerl->WebCGI tip

2001-10-05 Thread Stephan Tinnemeyer

Shannon Murdoch wrote:
> 
> Before uploading your scripts for running, use a program like TexEdit Plus
> or BBEdit to add CF/LF's to your script, otherwise it may not run properly.
> 

Shannon,

Perl scripts are text files. Therefore, they should be up- and
downloaded in text mode (ftp). This will translate e. g. line
feeds/breaks to the platform specific character(s) automatically.

It seems very likely that you had the problems you had because you used
your ftp client app in binary mode which will not perform any translations.

Obviously, your ftp client app did not recognize the Perl scripts as
text files and switch to text mode automatically. This is, of course,
not a Perl issue but a Macintosh issue. You may mail me off-list.

Cheers

Stephan

-- 
Dipl.-Chem. Stephan Tinnemeyer
Lindenallee 20
24105 Kiel
Germany

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




Win32 & UNIX Webserver issue

2001-10-05 Thread Shannon Murdoch

Hi all, I've finished writing one of my longest scripts to date and uploaded
it to a WindowsNT Apache webserver- works fine.  On a Unix server (f2s.com),
it doesn't run, and gives no clues as to why.

Is there any common issues that I should be aware of in regards to
Win32/unix compatibility in my scripts?

Thanks in advance.


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




Re: problem

2001-10-05 Thread Shannon Murdoch

Don't know if this helps:  It's from perl.daily.tips


On to the tip: Anyone have seen code like

  print "http://$url/\";>$site (\"$title\")";

Now, it is quite annoying to read all those \'s, so you would think
there is a better way.

Well, there is! :-)

The above line could be written as

  print qq[http://$url/";>$site ("$title")];

So instead of using " as the quote operator we used qq[ and ] to end
the quote.

You can also use for example qq{ (or any other form of "brackets"), like
  
  print qq{...};


Like "text" can be substituted with qq[text] you can use a single q
for ', so a confusing statement like

  '\'[EMAIL PROTECTED]\''

can be written as

  q['[EMAIL PROTECTED]']

instead.



> From: [EMAIL PROTECTED] (Unknown Sender)
> Newsgroups: perl.beginners.cgi
> Date: Sun, 3 Jun 2001 00:59:20 -0300 (ADT)
> To: Derek Duhon <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: problem
> 
> You should escape all of the quotes that you want printed.
> 
> print "Content-type:
> text/html\n\nEndless! \"#00\">$current = \"endless?$prev\">Previous Page | Next
> Page";
> 
> 
> Johnathan Thibodeau
> 
> Pound bang user bin perl
> fork while true
> 
> On Sat, 2 Jun 2001, Derek Duhon wrote:
> 
>> I have a print statement that prints out an html page, and after a lot of
>> tinkering, I still can't get it to work.  It prints out the html perfectly,
>> but I can't seem to find a way for it to print the contents of the scalar
>> statements.  The print statement is encased in "".  Here is my source
>> 
>> #!usr/local/bin/perl
>> #
>> #Program to generate endless webpage
>> $current = $ENV{"QUERY_STRING"};
>> $next = ++$current;
>> $prev = --$current;
>> print "Content-type:
>> text/html\n\nEndless!> "#00">$current> "endless?$prev">Previous Page | Next
>> Page";
>> 
>> 
> 


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




MacPerl->WebCGI tip

2001-10-05 Thread Shannon Murdoch

Just thought I'd share the solution to a problem I've been having many
headaches over using MacPerl to make cgi's for the web.

Before uploading your scripts for running, use a program like TexEdit Plus
or BBEdit to add CF/LF's to your script, otherwise it may not run properly.

It took me six or seven rewrites of an 8 page script to figure this out!  Oh
well, I sorted out some minor bugs in the process =)

-Shannon Murdoch


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