how to open a file in txt/html/xml format using a perl program?

I am trying to write a program using perl which will display the contents of a file in the same format as it is(i dont want to read the contents of the file on the command prompt)….and then ill search for the particular string in it but thats next part…first i want to

Comments

  1. Perl_Help says:

    Please correct me if i am wrong in understanding your plroblem, is it that you want to view contents of text file in notepad and xml or html in IE, or you just simply want to read the data?

    For the former soultion is like..

    @Filenames = @ARGV;
    foreach (@Filenames) {
    $file = $_;
    if ( $file =~ /.+\.txt$/i ) {
    print "text file";
    system("notepad $file");
    if ( $file =~ /.+\.xml$/i ) {
    print "xml file";
    system("iexplore $file");

    }

    For opening txt file you can use open FH, $filname;(read mode)
    for reading XML files you can use
    use XML::Simple;

    }

legitimate work from home jobs | Event Planning Bay Area | rent video games | Homeloans | Plumbing Courses in Manchester | increase fertility | Green Drink | Photo Keyring | Vitamin D Deficiency Symptoms | skip bags | Order Fulfillment Software | virtual receptionist | Educators Credit | bodybuilding workouts | window cleaning