home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl
- print "hello\n\n";
- while ( <STDIN> )
- {
- print "type three words ";
- print "separated by spaces\n";
- ($first,$second,$third) = split(/\s+/,$_,3);# at MOST three
- print "first is: $first, first 10 chars are ";
- print substr($_,0,10)."\n"; # print substring with nl appended
- tr/A-Z/a-z/;
- print;
- s/crap/whizz/;
- print;
- if(/bingo/)
- {
- print "bongo\n";
- }
- }
-
-