Perl to C#

Posted on 2008-11-05
Last Modified: 2012-08-14

Can anyone please help me converting Perl code to C# ? I will email it to any one who can please help me
Question by:dotnetpro
    LVL 16

    Expert Comment

    Instead of mailing it, why dont you post it here?
    LVL 1

    Accepted Solution

    ok here you go then. I have no idea about it.
    sub cookie {
    $HomeScriptDir = 0;
    $HomeScriptDir = "/proj/mplb2b/www/shipping/cgi-bin/cookie";
    $wsldir =$HomeScriptDir;
    $validate ="$wsldir/validate"; # set variable to the location of validate file
    $keyring = "$wsldir/keyring.b2b.public.db"; # set variable to the location of keyring file
    $cookie = $ENV{'HTTP_COOKIE'}; # excepting env cookie
    &parse_recs ($cookie, *mycookie);
    $ford_wsl = $mycookie{'Ford-WSL'};
    $cdsid = $ENV{'REMOTE_USER'}; # setting cdsid variable to env id (cds id or FSN
    $wslcookie{'cdsid'} = $ENV{'REMOTE_USER'}; # setting the hash to env id (cds id
    $wslcookie{'cdsid'} =~ tr/a-z/A-Z/; # Regular expression converting all lower ca
    @wsl_data=`$validate -tepiq -k $keyring $ford_wsl 2>/dev/null`; # populate array
    $wslcookie{'ciphertxt'} = $ford_wsl;
    $wslcookie{'issuedate'} = $wsl_data[1];
    $wslcookie{'expiredate'} = $wsl_data[2];
    $wslcookie{'issuer'} = $wsl_data[3];
    $wslcookie{'ipaddr'} = $wsl_data[5];
    $wslcookie{'acigroup'} = $wsl_data[6];
    $wslcookie{'deptnum'} = $wsl_data[7];
    $wslcookie{'orgcODE'} = $wsl_data[8];
    $wslcookie{'emptype'} = $wsl_data[9];
    $wslcookie{'mrrole'} = $wsl_data[10];
    $wslcookie{'org'} = $wsl_data[11];
    $wslcookie{'company'} = $wsl_data[12];
    $wslcookie{'divabbr'} = $wsl_data[13];
    $supplier_site_code=$wslcookie{'org'}; # defines user site
    } # end of sub routine cookie

    Open in new window


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now