Njoud has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: system subroutine is ignored
by BrowserUk (Patriarch) on Jun 29, 2013 at 15:43 UTC
    what I have noted is the system doesn't executed (ignored) ! and I get nothing ! (No errors) can anyone suggest a solution for this ?! p

    What I've noticed is that this is the same question you asked here; to which you got responses to which you responded, but now you seem to have forgotten.

    For example:

    And in that thread you were using Windows7, but in this thread you say: " I am using XP<".

    All of which leaves it looking like you are very confused.

    If you want help, you need to do some work. For a start, can you run the command successfully outside of Perl(ie. from a command line)?

    If so, open a cmd window, and type the following sequence of commands and then copy&paste the output here:

    c:\>attrib /s glomosim.exe c:\>attrib /s data.in

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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.

      Yes ,I am confused from the error , I tried everything I found to pass a cmd command using system and I got either errors or nothing . I stoped at the lastest error "can't spawn "cmd.exe" : No such file or directory at run_FtpGen.pl line 71...." and I didn't get any suggestion to solve it. So I have installed windows XP on my second laptop and install perl on it ! because I was wonder that the reason is with windows 7. I am beginner with perl.no time to me to learn it in deep Just plz tell me How I can pass a commaned to cmd using system subrotine?! I don't know why it is ignored and I got nothing now ! Thank you

        "no time to me to learn it in deep"

        No time to help those who won't help themselves!


        If you didn't program your executable by toggling in binary, it wasn't really programming!

      I do what you have suggest

      c:\>attrib /s glomosim.exe c:\>attrib /s data.in
      on cmd , and for both commands I got : 'attrib' is not recognized as and internal or external command,operable program or batch file.

        Highly implausible... unless
        • Your copies of Windows are broken
        • You didn't do exactly what you are showing us

        Try help attrib OR attrib /? to see if you get the message you cite.

        And if, perchance, glosomin.exe and data.in are on some drive other than C:, the message should have been to the effect "(filename) not found" or some variation thereof. But attrib had been an M$ command from some early, pre-Windows version of DOS.


        If you didn't program your executable by toggling in binary, it wasn't really programming!

Re: system subroutine is ignored
by marto (Cardinal) on Jun 29, 2013 at 15:37 UTC

    We discussed in your previous thread how to check for errors, here you've not even bothered.

Re: system subroutine is ignored
by thomas895 (Deacon) on Jun 30, 2013 at 02:59 UTC

    Oh for god's sake, if it's really so bloody difficult, then we'll just split it up:

    C:\> glomosim data.in > \path\to\some\dir\file.txt C:\> mysuperawesomescriptthatdoessomething.pl \path\to\some\dir\file.t +xt

    Now I don't know what a "glomosim" is or what it does, so adjust the output redirection accordingly.
    Good luck -- you'll need it if you show no interest in following the (very straightforward) advice already given to you.

    ~Thomas~ 
    "Excuse me for butting in, but I'm interrupt-driven..."
      Thank you thomas ! my problem has been solved with another silly step! Good Luck all
Re: system subroutine is ignored
by poj (Abbot) on Jun 29, 2013 at 15:58 UTC

    Create a batch file

    rem start.bat program glomosim data.in
    and if that works then try
    system("start.bat")
    poj

      when I put the following as Mr.Poj said

      rem start.bat program glomosim data.in
      I get the following error : Can't locate object method "rem" via package start...

        Did you actually put that in a batch file (read your M$ manual) and then call the batch file from Perl, or did you merely try to insert it in the code you've shown?

        If you didn't program your executable by toggling in binary, it wasn't really programming!

        Remove the first line and try again.

        poj