* Re: Can Perl Run from Shebang Line on BASH Shell on Windows 98 Computer?
@ 2000-03-03 11:56 Earnie Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Earnie Boyd @ 2000-03-03 11:56 UTC (permalink / raw)
To: James E Keenan, cygwin
--- James E Keenan <jkeen@concentric.net> wrote:
> I am having problems running Perl on my Windows 98 machine using the Cygwin
> B-32 BASH shell. While I can run Perl from the command line, I cannot yet get
> "stand-alone" Perl programs to run, i.e., programs where Perl runs not
> because the command "perl -e" is evoked in the first position on the command
> line but rather because the ".pl" file itself has information concerning the
> location of the Perl interpreter on the computer.
>
> Installation: Perl version 5.005_03 built for MSWin32-x86-objec.
> Binary build 522 from ActiveState Tool Corp.
>
NON-CYGWIN programs will not know about the Cygwin mounted paths. You will
need to use an absolute DOS path for the here document. You will need to do
something like:
#! c:\\program\ folder\\perl\\bin\\perl
Caveat: Untested.
=====
---
Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
__Cygwin: POSIX on Windows__
Cygwin Newbies: < http://www.freeyellow.com/members5/gw32/index.html >
__Minimalist GNU for Windows__
Mingw32 List: < http://www.egroups.com/group/mingw32/ >
Mingw Home: < http://www.mingw.org/ >
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Can Perl Run from Shebang Line on BASH Shell on Windows 98 Computer?
@ 2000-03-02 19:04 James E Keenan
0 siblings, 0 replies; 2+ messages in thread
From: James E Keenan @ 2000-03-02 19:04 UTC (permalink / raw)
To: cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3943 bytes --]
I am having
problems running Perl on my Windows 98 machine using the Cygwin B-32 BASH shell.
While I can run Perl from the command line, I cannot yet get "stand-alone" Perl
programs to run, i.e., programs where Perl runs not because the command "perl
-e" is evoked in the first position on the command line but rather because the
".pl" file itself has information concerning the location of the Perl
interpreter on the computer.
Installation : Â Â Â Â Â Â Â Â Â Â Â
Perl version 5.005_03 built for MSWin32-x86-objec. Â Binary build 522 from ActiveState Tool
Corp.
          Â
          Â
BASH shell downloaded from Cygwin, version B20.
Objectives : I have
multiple objectives in studying Perl.
(1) Write
CGI scripts for Web site am designing. Am working my way thru E. Castro's "Perl
and CGI for the World Wide Web" (Peachpit Press). Have directory on a friend's
server which I can use for practice purposes; server runs Apache web server with
BASH-2.02 shell. Have learned enough Unix to Telnet to that server, get around
it, change permissions, etc. So far so good.
(2) On my
job (hospital) I face problem of editing text files (client medication
histories) so as to make them conform to a certain database format. Â Friend with Perl expertise says this
would be an ideal job for Perl. Â
However, job would have to be done on PC rather than over network/Net to
a file server.
Question
arises: Â Should I learn Perl thru an
MS-DOS command line for this application, while learning Perl thru BASH command
line for regular Web application? Â
My thinking: Â It would
probably be simpler to learn one command line (BASH) first. Â However, that means that I have to get
the BASH shell to work on a Windows 9x machine -- and that I have to get Perl to
work properly on that shell.
Hence the
Cygwin and ActiveState downloads. Â
But my Perl practice programs only seem to work when "perl -e" is called
on the command line. Â I can't get
programs which start with the shebang line to run. Â In addition, the command "which perl"
doesn't work. Â It generates the
message: Â "bash: Â which: Â command not
found".
Research : Â Â Â Â Â Â Â Â Â Â Â
My research into this problem has generated contradictory
information. Â The ActivePerl FAQ
( <http://www.activestate.com/ActivePerl/docs/perl-win32/perlwin32faq4.html> )
states: Â "...Win32 platforms don't
provide the shebang syntax, or anything like it. Â The FAQ suggests (a) calling the perl
interpreter directly (as in "perl myscript.pl"), (b) installing an Apache
webserver on a Win32 system (which does accept the shebang syntax) or (c)
converting Perl script into a batch file using the "pl2bat" utility distributed
with Perl for Win32. Â (b) and (c)
seem overly complex, especially to a beginner like
me.
The O'Reilly
book Learning Perl on Win32 Systems,
however, says (p.9 fn.), "...there are Win32 ports of UNIX shells (e.g., tcsh, ksh, and bash ) that do understand shebang
lines. Â If you're using one of these
shells, you can use shebang lines by specifying the path to your Perl
interpreter."
Vincent
Loweâs Perl Programmerâs Interactive
Workbook (Prentice Hall PTR) states that âFor MS-DOS operation, youâll need
to make the program look like a batch file and have it start Perl for you.â
(p.23) Â However, itâs not clear
whether this applies to any DOS-based system (including my Windows 98
system) or just to the MS-DOS shell and command line. Â If the former, then on a Windows
computer Iâll have to learn Perl via the DOS command line; BASH would be
useless. Â If the latter, I should be
able to learn Perl via the BASH command line, whether the installation is a
Windows computer or Unix.
Can anybody
help?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-03-03 11:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-03 11:56 Can Perl Run from Shebang Line on BASH Shell on Windows 98 Computer? Earnie Boyd
-- strict thread matches above, loose matches on Subject: below --
2000-03-02 19:04 James E Keenan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).