SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Perl download file error

    Hi all,

    I have two pages. first page have download link, and second page have downlaod code. I had written this code to download the same file as .CSV where the download code written.

    When i execute it , I am getting Scripting error. Someone plz help.

    Code Perl:
    #!/usr/bin/perl
    use CGI qw(:standard);
    my $cgi = new CGI;
    my $count = 0;
    use CGI::Carp qw(fatalsToBrowser);
     
    $html=$cgi->param('htmltable');
     
    my @value1 = split('@', $html);
     
    foreach my $val (@value1) {
        print "$val\n";
      }
     
    print $cgi->header(-expires=>'now', -type=>'application/x-csv', -content_disposition=>"attachment; filename=export_teble.csv");
    print "$html";
    print $cgi->end_html;

  2. #2
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which error are you getting?


Bookmarks

Posting Permissions

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