Loading ...
Sorry, an error occurred while loading the content.
 

Need help with Regular Expressions

Expand Messages
  • rajini_prabhu@yahoo.com
    Hi, Can anyone tell me what this Perl code does? ($profilePath =~ /^ $_lhost( .*)$/) and do { $t = $1; system mkdir e:$t ; system cacls e:$t /E /P
    Message 1 of 2 , Aug 1 11:01 AM
      Hi,

      Can anyone tell me what this Perl code does?



      ($profilePath =~ /^\\\\$_lhost(\\.*)$/) and do {
      $t = $1;
      system "mkdir e:$t";
      system "cacls e:$t /E /P $loginName:F";
      };

      Thanks.

      Rajini
    • Daviid Goodchidl
      This code looks for lines that begin with followed by whatever is held in $_lhost, followed bgy and zero or more dots then the end of the line. The code
      Message 2 of 2 , Aug 2 3:24 AM
        This code looks for lines that begin with \\ followed
        by whatever is held in $_lhost, followed bgy \\ and
        zero or more dots then the end of the line.

        The code assigns the parenthesised pattern to $t, then
        creates a directory (called whatever is in $t) and
        calls the cacls command (used to edit and display
        NTFS file permissions) to edit and replace the file
        permissions on the new directory with whoever is held
        in $logname.

        Basically, the code assigns the pattern to
        $profilepath
        - if the pattern is found this evaluates to true and
        the directory creation and permissions operations are
        performed.





        bhu@... wrote:
        <HR>
        <html><body>
        <tt>
        Hi,<BR>
        <BR>
        Can anyone tell me what this Perl code does?<BR>
        <BR>
        <BR>
        <BR>
        ($profilePath =~ /^\\\\$_lhost(\\.*)$/) 
        and  do  {<BR>
                $t =
        $1;<BR>
                system
        "mkdir e:$t";<BR>
                system
        "cacls e:$t /E /P $loginName:F";<BR>
            };<BR>
        <BR>
        Thanks.<BR>
        <BR>
        Rajini<BR>
        <BR>
        <BR>
        <BR>
        </tt>



        <br>
        <tt>Your use of Yahoo! Groups is subject to the <a
        href="http://docs.yahoo.com/info/terms/">Yahoo! Terms
        of Service</a>.</tt>
        </br>

        </body></html>


        ____________________________________________________________
        Do You Yahoo!?
        Get your free @... address at http://mail.yahoo.co.uk
        or your free @... address at http://mail.yahoo.ie
      Your message has been successfully submitted and would be delivered to recipients shortly.