home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!uunet.ca!unilabs!chare
- From: chare@unilabs.uucp (Chris Hare)
- Subject: stupid questions : deleted ing leading spaces
- Message-ID: <1992Sep7.022351.1137@unilabs.uucp>
- Organization: None: Just Me, Chris Hare
- Date: Mon, 7 Sep 1992 02:23:51 GMT
- Lines: 23
-
- This is stupid.
-
- I am running 4.035 and I need to delete a single leading space at the
- beginning of a line.
-
- I would have thought that
-
- tr/^ //;
-
- would have worked since the line is in $_.
-
- But alas, it doesn't. There are other spaces in the line, but I don't want
- them affected.
-
- 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.
-
- Thanks!
- --
- ???? --- It Always works for me! ---
- Chris Hare, UNIX Scientist Preferred : chare@unilabs.uucp
- Just a mild-mannered consultant by day ....
-