home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!psgrain!onion!jeff
- From: jeff@onion.rain.com (Jeff Beadles)
- Subject: Re: stupid questions : deleting leading spaces
- Message-ID: <1992Sep7.053000.14239@onion.rain.com>
- Reply-To: jeff@onion.rain.com (Jeff Beadles)
- References: <1992Sep7.022351.1137@unilabs.uucp>
- Date: Mon, 7 Sep 1992 05:30:00 GMT
- Lines: 19
-
- chare@unilabs.uucp (Chris Hare) writes:
-
- >I am running 4.035 and I need to delete a single leading space at the
- >beginning of a line.
-
- Well,
-
- s/^ +//;
-
- >As a matter of ofact, if you can suggest a way to remove the leading
- >spaces, and compact multiple spaces any where else on the line to be one
- >space I'd appreciate it.
-
- s/ +/ /g;
-
- Later,
- -Jeff
- --
- Jeff Beadles jeff@onion.rain.com
-