download window instead of executing

2007-06-25 Thread Dan Jablonsky
hi all,
just a quick questions: why do I get a download window
when I'm trying to execute a .pl file in the browser?
It's something very simple but I forgot how one fixes
this.

I'll get back with details if necessary,
kowalsky


  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Win32 Shortcut?

2007-06-25 Thread Michael Higgins
I can't seem to find win32::shortcut... I'm assuming some other
ppm-available module now has this feature, but I haven't found it yet.

Anyone have a suggested solution?

Cheers,

--
   . .   .   .   .  .   .   . .. ...   .   .  .``.
   .`. .`.   .   . .`   .   .   .   .   .` .`  .   .`. .  `.
   .  `  .   .   .`..`` .```.   .   .  ..  .  ..   .   .  `.`.
   . .   .   .  `.  .   .   .`..`   `..`   .   .   .  `..`
 


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32 Shortcut?

2007-06-25 Thread Jan Dubois
On Mon, 25 Jun 2007, Michael Higgins wrote:
 I can't seem to find win32::shortcut... I'm assuming some other ppm-
 available module now has this feature, but I haven't found it yet.

It is part of the libwin32 package.  It is already installed if you are
using ActivePerl.

One problem is that it is not using POD for documentation, so the docs
will not show up in the HTML docs, and perldoc will come up empty too.
You can browse them online here:

http://search.cpan.org/src/JDB/libwin32-0.27/Shortcut/docs/index.html

Cheers,
-Jan

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: download window instead of executing

2007-06-25 Thread Hoopes, William @ CSE
I'm sure others have a more elegant way of doing it, but make this the
first thing you print to stdout:

print Content-Type: text/html\n\n;
print \n;



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Dan Jablonsky
Sent: Monday, June 25, 2007 1:37 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: download window instead of executing

hi all,
just a quick questions: why do I get a download window
when I'm trying to execute a .pl file in the browser?
It's something very simple but I forgot how one fixes
this.

I'll get back with details if necessary,
kowalsky


 


Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


control M's

2007-06-25 Thread Chris Rodriguez
Hi everyone,
  I wrote a cgi script in PERL which won't execute.  I'm told it's  because I 
have control M's at the end of each line, and that this  happens when editing 
programs in Windows (which I do, with  Notepad).  I found a free program on the 
web  (http://www.scriptarchive.com/scripts/snippets/rm_cont_m.pl) which  claims 
to remove them.  I ran it and uploaded the new program, but  it still doesn't 
work.  It may be that there's another problem  with the script, then again, 
maybe the control M's are still  there.  I'd like to rule out the latter.  Can 
anyone advise  me on dealing with this?  How can I remove them?  How can I  
tell if they're there or not?  How can I type up a script so that  they never 
appear in the first place, etc.?
  
  Thank you,
  Chris
  
   
-
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: control M's

2007-06-25 Thread Javier Nunez (DHL US)
One of several ways is 

Vi the file in Unix (assuming you try to run it there) then

Shift :
1,$s/press Ctrl - v M//g

This will remove all Ctrl-M in the file

You can script this very easy

Saludos
Javier
Javier Nunez
Principal Systems Support Engineer
[EMAIL PROTECTED]
+1 (480) 375-6263
DHL ITSC Americas

- Original Message -
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Sent: Mon Jun 25 13:40:43 2007
Subject: control M's

Hi everyone,
I wrote a cgi script in PERL which won't execute.  I'm told it's because I have 
control M's at the end of each line, and that this happens when editing 
programs in Windows (which I do, with Notepad).  I found a free program on the 
web (http://www.scriptarchive.com/scripts/snippets/rm_cont_m.pl) which claims 
to remove them.  I ran it and uploaded the new program, but it still doesn't 
work.  It may be that there's another problem with the script, then again, 
maybe the control M's are still there.  I'd like to rule out the latter.  Can 
anyone advise me on dealing with this?  How can I remove them?  How can I tell 
if they're there or not?  How can I type up a script so that they never appear 
in the first place, etc.?

Thank you,
Chris




Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now 
http://us.rd.yahoo.com/evt=48223/*http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
  (it's updated for today's economy) at Yahoo! Games.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: control M's

2007-06-25 Thread Phil Brewer
We use a free editor, Metapad Lite 
(http://www.liquidninja.com/metapad/download.html). This enables you to save 
files as DOS Text (CR+LF), Unix Text (LF), Unicode or Unicode (Big Endian).
Are you sure the CRs are the problem?

Phil Brewer
Trivex Systems
  - Original Message - 
  From: Chris Rodriguez 
  To: [EMAIL PROTECTED] 
  Sent: Monday, June 25, 2007 9:40 PM
  Subject: control M's


  Hi everyone,
  I wrote a cgi script in PERL which won't execute.  I'm told it's because I 
have control M's at the end of each line, and that this happens when editing 
programs in Windows (which I do, with Notepad).  I found a free program on the 
web (http://www.scriptarchive.com/scripts/snippets/rm_cont_m.pl) which claims 
to remove them.  I ran it and uploaded the new program, but it still doesn't 
work.  It may be that there's another problem with the script, then again, 
maybe the control M's are still there.  I'd like to rule out the latter.  Can 
anyone advise me on dealing with this?  How can I remove them?  How can I tell 
if they're there or not?  How can I type up a script so that they never appear 
in the first place, etc.?

  Thank you,
  Chris



--
  Boardwalk for $500? In 2007? Ha! 
  Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.


--


  ___
  Perl-Win32-Users mailing list
  Perl-Win32-Users@listserv.ActiveState.com
  To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: control M's

2007-06-25 Thread Javier Nunez (DHL US)
Or you can get Crisom editor (download it for free) and save it on Unix format 
and that will take the Ctrl-M as well

Saludos
Javier

Javier Nunez
Principal Systems Support Engineer
[EMAIL PROTECTED]
+1 (480) 375-6263
DHL ITSC Americas

- Original Message -
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Sent: Mon Jun 25 13:40:43 2007
Subject: control M's

Hi everyone,
I wrote a cgi script in PERL which won't execute.  I'm told it's because I have 
control M's at the end of each line, and that this happens when editing 
programs in Windows (which I do, with Notepad).  I found a free program on the 
web (http://www.scriptarchive.com/scripts/snippets/rm_cont_m.pl) which claims 
to remove them.  I ran it and uploaded the new program, but it still doesn't 
work.  It may be that there's another problem with the script, then again, 
maybe the control M's are still there.  I'd like to rule out the latter.  Can 
anyone advise me on dealing with this?  How can I remove them?  How can I tell 
if they're there or not?  How can I type up a script so that they never appear 
in the first place, etc.?

Thank you,
Chris




Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now 
http://us.rd.yahoo.com/evt=48223/*http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
  (it's updated for today's economy) at Yahoo! Games.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: control M's

2007-06-25 Thread John Townsend
For Windows, I'm fond of the text editor Ultra Edit. It is not expensive
and I've been using it for years.
 
(For Mac heads, I suggest BBEdit--I'd use it on Windows if they made a
Win version)



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Chris Rodriguez
Sent: Monday, June 25, 2007 1:41 PM
To: [EMAIL PROTECTED]
Subject: control M's


Hi everyone,
I wrote a cgi script in PERL which won't execute.  I'm told it's because
I have control M's at the end of each line, and that this happens when
editing programs in Windows (which I do, with Notepad).  I found a free
program on the web
(http://www.scriptarchive.com/scripts/snippets/rm_cont_m.pl) which
claims to remove them.  I ran it and uploaded the new program, but it
still doesn't work.  It may be that there's another problem with the
script, then again, maybe the control M's are still there.  I'd like to
rule out the latter.  Can anyone advise me on dealing with this?  How
can I remove them?  How can I tell if they're there or not?  How can I
type up a script so that they never appear in the first place, etc.?

Thank you,
Chris




Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now
http://us.rd.yahoo.com/evt=48223/*http://get.games.yahoo.com/proddesc?g
amekey=monopolyherenow  (it's updated for today's economy) at Yahoo!
Games.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: control M's

2007-06-25 Thread Jack D
The problem likely occurs when you upload (assuming you meant ftp when you
said that. Ensure you ftp the file in ASCII mode when going from windows
to unix or vice versa. This will automatically remove any CR's.

http://en.wikipedia.org/wiki/Newline#Common_problems

Jack




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Chris Rodriguez
Sent: Monday, June 25, 2007 2:41 PM
To: [EMAIL PROTECTED]
Subject: control M's


Hi everyone,
I wrote a cgi script in PERL which won't execute.  I'm told it's
because I have control M's at the end of each line, and that this happens
when editing programs in Windows (which I do, with Notepad).  I found a free
program on the web
(http://www.scriptarchive.com/scripts/snippets/rm_cont_m.pl) which claims to
remove them.  I ran it and uploaded the new program, but it still doesn't
work.  It may be that there's another problem with the script, then again,
maybe the control M's are still there.  I'd like to rule out the latter.
Can anyone advise me on dealing with this?  How can I remove them?  How can
I tell if they're there or not?  How can I type up a script so that they
never appear in the first place, etc.?

Thank you,
Chris




Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now
http://us.rd.yahoo.com/evt=48223/*http://get.games.yahoo.com/proddesc?gamek
ey=monopolyherenow  (it's updated for today's economy) at Yahoo! Games.


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: control M's

2007-06-25 Thread Chris Wagner
That's a common problem with DOS versus unix file format.  U can use the
commandline tool dos2unix to convert it after u upload it.  DOS creates new
lines explicitly with the sequence CRLF while unix just uses LF (making the
CR implicit).

A simple workaround so that the file remains valid on both Windows and unix
is to add -I/dev/null to the shebang line at the beginning of the script.
This is a fix because it's the trailing CR at the end of that line that's
messing up ur script.  The system is looking for an interpretor literally
named /usr/bin/perl^M.  It's blindly splitting the line on LF characters.
The -I/dev/null will eat the CR at the line's end allowing the system to
locate /usr/bin/perl.

So like this:
#!/usr/bin/perl -I/dev/null

This doesn't hurt anything since /dev/null can never affect ur program on
unix and it simple doesn't exist on Windows.  U can tell if they're there or
not by viewing the file with vi/vim on the unix box.  It will print them as
^M if present.


At 01:40 PM 6/25/2007 -0700, Chris Rodriguez wrote:
Hi everyone,
  I wrote a cgi script in PERL which won't execute.  I'm told it's  because
I have control M's at the end of each line, and that this  happens when
editing programs in Windows (which I do, with  Notepad).  I found a free
program on 




--
REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =--
...ne cede malis

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: download window instead of executing

2007-06-25 Thread Chris Wagner
At 10:36 AM 6/25/2007 -0700, Dan Jablonsky wrote:
just a quick questions: why do I get a download window
when I'm trying to execute a .pl file in the browser?
It's something very simple but I forgot how one fixes
this.

Hi. What do u mean by execute in the browser?  That doesn't make sense.  Are
u trying to run the script as a CGI and have it print its output to the
browser? If so then u don't have the script in the web server's CGI
directory.  If u want to have the script execute anywhere, not just in the
CGI dir, u have to enable script aliasing in the webserver's configuration
so that it will recognize .pl as an executable extension.




--
REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =--
...ne cede malis

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs