home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / perl / 5754 < prev    next >
Encoding:
Text File  |  1992-09-08  |  739 b   |  30 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!psgrain!onion!jeff
  3. From: jeff@onion.rain.com (Jeff Beadles)
  4. Subject: Re: stupid questions : deleting leading spaces
  5. Message-ID: <1992Sep7.053000.14239@onion.rain.com>
  6. Reply-To: jeff@onion.rain.com (Jeff Beadles)
  7. References: <1992Sep7.022351.1137@unilabs.uucp>
  8. Date: Mon, 7 Sep 1992 05:30:00 GMT
  9. Lines: 19
  10.  
  11. chare@unilabs.uucp (Chris Hare) writes:
  12.  
  13. >I am running 4.035 and I need to delete a single leading space at the
  14. >beginning of a line.
  15.  
  16. Well,
  17.  
  18. s/^ +//;
  19.  
  20. >As a matter of ofact, if you can suggest a way to remove the leading
  21. >spaces, and compact multiple spaces any where else on the line to be one
  22. >space I'd appreciate it.
  23.  
  24. s/  +/ /g;
  25.  
  26. Later,
  27.     -Jeff
  28. -- 
  29. Jeff Beadles        jeff@onion.rain.com
  30.