Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: space in filepath and in filename for system function

by anniyan (Monk)
on Aug 04, 2005 at 10:24 UTC ( #480758=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://480758]
help
Chatterbox?
[shmem]: Discipulus: while (readdir DIR) works fine
[Discipulus]: Eataly vs World(coffe) ;=)
[Discipulus]: shemem i wrote it directly.. but when i tested it i got a lot of 'undefined value..'
[Corion]: Oh, poor Trump can't get a break. Even the Vatican only sends the second in command to greet him...
[shmem]: Discipulus: readdir has the same semantics as readline (a.k.a <>). Have another coffee ☕ ;-)
[Discipulus]: ah! just with my old system perl (5.8.8) was needed
[Corion]: Has anybody toyed around with Mastodon? There is a Perl module for it, but I'm not sure that it's a yak worth chasing
[Corion]: On the upside, maybe running that for my family would be interesting, or at least for myself

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-05-26 07:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?