Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] "interactive" perl
- Date: Thu, 29 Aug 2002 10:28:17 -0400
- From: Josh Glover <jmglov@example.com>
- Subject: Re: [tlug] "interactive" perl
- References: <006201c01193$6dc86c10$5a00a8c0@example.com>
- User-agent: Mutt/1.4i
Quoth Brett Robson (Tue 2000-08-29 05:30:45PM +0900): > > I've been using perl for only about a year now, doing all the typical > things. <snip> > I've got a rude shock [...] You've been using Perl for a year and this is your first rude shock? As one of my favourite professors says about Perl: "Maybe I'm corrupted by normal language syntax."[1] Now, about how I typically do interactive stuff in Perl: print "Enter some value: "; chomp( $answer = <STDIN> ); The chomp() bites off the newline at the end of the input. Of course, you might want it, so if you do, do not chomp(), just say: $answer = <STDIN>; And of course, since it is Perl, it allows extreme laziness: $answer = <>; Hope I answered your question. --Josh [1] http://www.cs.wm.edu/~jmglov/quotations.html#kearns -- Josh Glover <jmglov@example.com> Associate Systems Administrator INCOGEN, Inc. http://www.incogen.com/ GPG keyID 0x62386967 (7479 1A7A 46E6 041D 67AE 2546 A867 DBB1 6238 6967) gpg --keyserver pgp.mit.edu --recv-keys 62386967Attachment: pgp00079.pgp
Description: PGP signature
- Follow-Ups:
- Re: [tlug] "interactive" perl
- From: Brett Robson
- References:
- [tlug] "interactive" perl
- From: Brett Robson
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Class B Hubs not suitable for data center use?
- Next by Date: Re: [tlug] Class B Hubs not suitable for data center use?
- Previous by thread: [tlug] "interactive" perl
- Next by thread: Re: [tlug] "interactive" perl
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links