home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / utilities / cli / perl / !Perl / scripts / pl / baz next >
Encoding:
Text File  |  1995-05-03  |  375 b   |  20 lines

  1. #!/usr/bin/perl
  2. print "hello\n\n";
  3. while ( <STDIN> )
  4. {
  5.     print "type three words ";
  6.     print "separated by spaces\n";
  7.     ($first,$second,$third) = split(/\s+/,$_,3);# at MOST three
  8.     print "first is: $first, first 10 chars are ";
  9.     print substr($_,0,10)."\n"; # print substring with nl appended
  10.     tr/A-Z/a-z/;
  11.     print;
  12.     s/crap/whizz/;
  13.     print;
  14.     if(/bingo/)
  15.     {
  16.         print "bongo\n";
  17.     }
  18. }
  19.  
  20.