in reply to re: hello world execution error

Because the file isn't there :)
$ dir /b nofile.plx File Not Found $ perl nofile.plx Can't open perl script "nofile.plx": No such file or directory $ echo die 6; > nofile.plx $ dir /b nofile.plx nofile.plx $ perl nofile.plx 6 at nofile.plx line 1. $ del nofile.plx $ dir /b nofile.plx File Not Found $ perl nofile.plx Can't open perl script "nofile.plx": No such file or directory
perlintro, perlrun, Behind the GUI lives the Shell

Replies are listed 'Best First'.
Re^3: hello world execution error
by kuladeep (Initiate) on Aug 12, 2011 at 04:41 UTC

    The file is there!! I have created a file with the name hello.plx in the folder BegPerl and try to execute it in the same path. Still it is showing the error " no such file found" I am sure the file is in the right path I specified :(

    Is it because I am running windows xp on a mac book?? Is that might be a problem.

      The file is there!!

      How do you know it is there? That is, how are you seeing it?

      My guess is that you are seeing it in the Windows Explorer. And that you have the Explorer option "Hide file extensions" enabled. And that the file is actually named 'Hello1.plx.txt'.

      To be sure, use the dir command.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        Whether that's actually the case or not... this response makes me believe you've possibly worked in tech support at some point in time. Entirely off-the-wall and entirely plausible/likely all in one.

        --Dave

      The file is there!!

      Except that it isn't -- if dir/perl both tell you the file isn't there, then it isn't there, no matter how sure you are.

      Is it because I am running windows xp on a mac book?? Is that might be a problem.

      The shell session I quoted was made on XP

      The file is there!! I have created a file with the name hello.plx in the folder

      you are saying you have saved file with name "hello.plx" and then

      I gave the path in the right way. like c:\BegPerl>perl hello1.plx

      The name of the file and the file you are trying to call from command line are probably different

      Hope this helps you