[EMAIL PROTECTED] wrote:
> I wish to read input from a user that has multiple lines with carriage
> returns from <stdin> but not actually stop reading until a single #
> on a line by itself. 

You can use perl's $/ variable to define an record separator. The default is
"\n", but you can change it.

Try this:

    $/ = "\n#\n";

    while (<STDIN>) {
        chomp;
        print "You entered: $_\n";
    }

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to