I tried it with curly ones but no avail

#!/usr/bin/perl
$_ = "barneybarneybarneyfredbarney";
s/fred/\s{10}/;
print $_;

I get this
barneybarneybarneys{10}barney

-----Original Message-----
From: Simon K. Chan [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 5 February 2002 4:03 PM
To: Stuart Clark
Subject: Re: simple question

try this:

$string =~ s/M/\s{20}/; ### instead of using square brackets, use curly
ones.

if that doesn't work, try this:

$string =~ s/M/ {20}/;

But the first one should work.

Let me know if that works.



########################################
--- Stuart Clark <[EMAIL PROTECTED]> wrote:
> How do I replace the letter M with 20 spaces.
>  
> s/M/\s[20]/; # dosen't seem to work :-(
>  
> Regards
> Stuart Clark
>  
> 


=====
#########################################

Warmest Regards,
Simon K. Chan - [EMAIL PROTECTED]

"Great spirits have always encountered violent opposition from mediocre
minds."  - Albert Einstein

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to