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

Re: Error when running perl script - unsuccessful stat on filename

Expand Messages
  • baba_babuskha
    Nevermind...I had to chomp the path and filename. It works now. ... delete ... post ... 1-
    Message 1 of 2 , Oct 5, 2006
    • 0 Attachment
      Nevermind...I had to "chomp" the path and filename.

      It works now.

      --- In perl-beginner@yahoogroups.com, "baba_babuskha"
      <baba_babuskha@...> wrote:
      >
      >
      > Hi,
      >
      > I don't know why I'm getting this error. When I run my script I
      delete
      > the old files before creating creating the new ones (see previous
      post
      > for code). It deletes the files that are named test-1-1.tmp or test-
      1-
      > 2.tmp but any files that contain "text" it won't delete. Why?
      >
      > sf30081-1-1-test.tmp or sf30081-1-1-test-two.tmp
      >
      > The filename and paths are being created properly and they do exist.
      >
      > etc.
      >
      > print "Removing: $outdir\\$ref_filename-$id_var\n" if (-
      > e "$outdir\\$ref_filename-$id_var");
      > print " Output: $outdir\\$ref_filename-$id_var\n";
      > if (-e "$outdir\\$ref_filename-$id_var") {
      > unlink "$outdir\\$ref_filename-$id_var" };
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.