Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: dynamic loading modules

by chromatic (Archbishop)
on Sep 03, 2012 at 18:07 UTC ( #991496=note: print w/replies, xml ) Need Help??


in reply to Re^2: dynamic loading modules
in thread dynamic loading modules

This is never going to work:

my $win32 ="Win32.pm"; import $win32 qw(GetOSName);

If there isn't already an import() in your current package, this will effectively become:

'Win32.pm'->import( 'GetOSName' );

Because there's no package called Win32.pm, nothing will get imported. You're better off writing:

Win32->import( 'GetOSName' );

... or even:

'Win32'->import( 'GetOSName' );

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991496]
help
Chatterbox?
[marioroy]: It's a quoting issue inside qx. It's File::Find or qx. LA chooses qx. Almost there.
[marioroy]: Also \"%S\\\n\" oh my, not fun.
[Discipulus]: good night folks
[marioroy]: I will make a mp3info script that takes the -p "%S\n" args and test qx. I'm on the road, so will come back.
[marioroy]: All because File::Find is not fun for LA.
[marioroy]: good night Discipulus.
[Discipulus]: perl dreams to you all
[marioroy]: LA my @music_times = qx(find \$HOME/Music/ Albums -type f -iname \'*.mp3\' -exec mp3info -p \"%S\\n\" {} \\;);

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2017-04-23 21:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.