That is one way to do it, but maybe you should tell him what it is that the regex 
does.  I remember from my newbie days that it wasn't too useful when people just threw 
regexes at me without explaining them because they look so daunting before you are 
used to them.

        -----Original Message----- 
        From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
        Sent: Mon 6/21/2004 3:14 AM 
        To: [EMAIL PROTECTED] 
        Cc: [EMAIL PROTECTED] 
        Subject: RE: split
        
        


        HI all,
        
        HI,
        
        I want to grep only XXXX  from $var , i want in a variable $y.
        
        $var="Owner: XXXXX          : rwx (all)";
        
        $var =~ m/Owner: (\w{5})\s*: rwx \(all\)/;
         $y = $1;
        
        
        
        Chetak
        
        --
        To unsubscribe, e-mail: [EMAIL PROTECTED]
        For additional commands, e-mail: [EMAIL PROTECTED]
        <http://learn.perl.org/> <http://learn.perl.org/first-response>
        
        
        

Reply via email to