in reply to Re: space in filepath and in filename for system function
in thread space in filepath and in filename for system function

Thanks for your reply.

I have stored that path in a variable $file.

It is passing the variable name itself as a argument.

system ('adrl.exe', '$file') || die ("not correct path");

Regards,
Anniyan
(CREATED in HELL by DEVIL to s|EVILS|GOODS|g in WORLD)

Replies are listed 'Best First'.
Re^3: space in filepath and in filename for system function
by davorg (Chancellor) on Aug 04, 2005 at 10:29 UTC

    Well yes. It would. If you put it in a single-quoted string. Variables aren't expanded in single-quoted strings. You need a double-quoted string. Or, actually, you don't need any quotes at all.

    system ('adrl.exe', $file) || die ("not correct path");
    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg