Results 1 to 3 of 3

Thread: php to perl

  1. #1
    Join Date
    Jul 2004
    Posts
    868

    Arrow php to perl

    hi
    please someone convert this codes to perl ,

    thanks !


    PHP Code:
    <?php
    if ($var1=='abc.com'){
        if (
    strrpos($var2,'ccn.com')==true){
                 echo 
    "hello ";
    }
    }

    ?>

  2. #2
    Code:
    if ($var1 eq 'abc.com' and $var2 =~ /ccn\.com/) {
    print 'hello';
    }
    or
    Code:
    print 'hello' if $var1 eq 'abc.com' and $var2 =~ /ccn\.com/;
    Last edited by AlexV; 05-30-2005 at 10:18 PM.

  3. #3
    Join Date
    Jul 2004
    Posts
    868
    thanks !
    works great !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •