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

Re: Need help with downloading DBI Module on a linux box

Expand Messages
  • Toma H
    I forgot to give you some datail why I need this software (I can not find on internet something like this and I create this but is not working , too many
    Message 1 of 6 , Nov 4, 2010
    • 0 Attachment
      I forgot to give you some datail why I need this software (I can not find on internet something like this and I create this but is not working , too many errors I `m beginer and I can not fix it alone :(

      use strict;
      use warnings;
      my $DATAIN_FILE = "test.txt";

      open my $data_in_fh, "<", $DATAIN_FILE
      or die "Cannot open '$datain_FILE' for reading - $!";

      while (<$DATAIN_FILE>) {
      chomp;
      $var = $_;
      @var= split ("|",$_);

      #Create and put value of filename
      my $fname_out = var[0];

      #Spit data to have file name and information to put in the file
      my ($fname;$data_out_fh) = split /|/, $;
      #if name of file fname_out the same with the name of first value in the line fname print line in the file
      if (fname=fname_out)
      {open $data_out_fh, ">", "$fname.txt"
      or die "Cannot open '$fname.txt' for writing - $!";
      print {$fname_out} "$data_out_fh\n";
      }

      }
      else
      {
      #if fname not the same with firts value in the line then create a new file with this name of firts value in line and add line in the file
      $fname_out=$fname
      open $data_out_fh, ">", "$fname.txt"
      or die "Cannot open '$fname.txt' for writing - $!";

      print {$fname_out} "$data_out_fh\n";
      }

      close($data_out_fh);


      the result of my work is too many errors
      c:\perl>start1.pl
      Global symbol "$datain_FILE" requires explicit package name at C:\_th\WORK\SCRIP
      T and help\extractie mef\start1.pl line 6.
      Global symbol "$var" requires explicit package name at c:\perl\start1.pl line 10.
      Global symbol "@var" requires explicit package name at c:\perl\start1.pl line 11.
      syntax error at c:\perl\start1.pl line 14, near "var["
      syntax error at c:\perl\start1.pl line 17, near "$fname;"
      Global symbol "$data_out_fh" requires explicit package name at c:\perl\start1.pl line 17.
      syntax error at c:\perl\start1.pl line 17, near "$data_out_fh) "
      Global symbol "$data_out_fh" requires explicit package name at c:\perl\start1.pl line 20.
      Global symbol "$data_out_fh" requires explicit package name at c:\perl\start1.pl line 22.
      syntax error at c:\perl\start1.pl line 25, near "}"
      c:\perl\start1.pl has too many errors.

      Can someone help me, I ask for a solution because I think is more easy to put some lines not to fix my bad syntax
    Your message has been successfully submitted and would be delivered to recipients shortly.