delorie.com/archives/browse.cgi | search |
From: | Daniel Barker <sokal AT holyrood DOT ed DOT ac DOT uk> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Penalty for immature language (PERL/BASH) |
Date: | Thu, 1 Mar 2001 20:29:35 +0000 |
Organization: | Edinburgh University |
Lines: | 28 |
Message-ID: | <Pine.SOL.4.21.0103012025260.2223-100000@holyrood.ed.ac.uk> |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 1010301105018 DOT 4534L-100000 AT is> |
NNTP-Posting-Host: | holyrood.ed.ac.uk |
Mime-Version: | 1.0 |
X-Trace: | scotsman.ed.ac.uk 983478569 29582 129.215.16.14 (1 Mar 2001 20:29:29 GMT) |
X-Complaints-To: | usenet AT scotsman DOT ed DOT ac DOT uk |
NNTP-Posting-Date: | 1 Mar 2001 20:29:29 GMT |
In-Reply-To: | <Pine.SUN.3.91.1010301105018.4534L-100000@is> |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On Thu, 1 Mar 2001, Eli Zaretskii wrote: > > At the BASH prompt, I launch the following PERL script, prog.pl: > > > > while(<>) > > { > > `$_` > > } > > > > If I give this a single line consisting of the word "poo", BASH performs > > an illegal instruction. > > Could you please describe, for the Perl-illiterate such as myself, > what does this loop do, in the terms of its interaction with the OS? In pseudocode, something like this: WHILE (there is an unprocessed line of standard input) { execute that line as if typed at the shell prompt, but without printing its output; } `<command_string>` in PERL is very similar to `<command_string>` in BASH. -- Daniel Barker.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |