[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] The S)ubstitute command



Ok, I was wondering if this is normal (Mac)Perl operations:

	Let's say you have a string.

	$a = "This is my string";

	And let's say you want to take everything from the word "my"
	over to the end of the string out of the string.  Like so:

	$a =~ s/my.*$//;

	What should the string wind up being?


	I get:

	$a = "This is          ";

	When I thought I would get:

	$a = "This is";

Using standard MacPerl v520r4 (or whatever the release is).  This came
up because I was trying to do a PRINT command to a file on some data. 
When I examined it, the output contained all of these trailing blanks. 
Yet the substitution command just says to take out all of the
information from the word "my" on over.

TIA!  :-)

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch