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

Sorry in advance as its probably easy, but how can i get perl to open up services.msc in windows? (C:/Windows/System32/services.msc) I have tried the following
#!/usr/bin/perl use warnings; use strict; system ("C:/Windows/System32/services.msc" ) or die "Cannot open file: $!"; ?>
but all i get is an error telling me search pattern not terminated at services9.pl line 7 Again apologies if this is really simply i'm still trying to learn my way around

Replies are listed 'Best First'.
Re: Open services.msc
by Corion (Patriarch) on Jul 26, 2011 at 19:59 UTC
    search pattern not terminated at services9.pl line 7

    So, have you looked at line 7?

      Looked but didn't understand why as i'm still learning, i did apologise in advance

        Line 7 in your posted code looks like

        ?>

        ... and that just doesn't make sense to Perl. It sees a question mark, and thinks that you want to do a pattern match, see perlop on m?PATTERN? resp. ?PATTERN?, but then it's missing the "closing" question mark.

Re: Open services.msc
by Evilbert (Initiate) on Jul 26, 2011 at 19:59 UTC
    Turns out just need to use exec, sorry if i wasted anyone's time