Running system command or batch file using system "[command]"

2006-08-12 Thread benbart
Hi all, Using Perl on Windows, at the moment am running commands and batch files using system "[OS COMMAND]/[BATCH FILE]", can someone tell me how can I check for the success or failure of running the command, i.e. like a return code in UNIX. Also, is there a better alternative to running OS comma

Re: Dynamic variables - from INI files ...

2006-08-12 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > > I am writing a Perl script that reads some kind of INI file. I cannot use > Config::INI or install any new modules due to some restriction so am reading > the whole INI text file one line at a time and storing them into an array. > Here are what on my INI files: > > FT

Statistics::R not always working

2006-08-12 Thread Robin
Hi, I have the following test script: - #!/usr/bin/perl use warnings; use strict; use Statistics::R; my $R = Statistics::R->new(); $R->startR; $R->send(qq`x <- c(1,2,3) \n print (x)`); my $ret = $R->read; print "Result: $ret\n"; $R->send(qq`x <- c(1,2,3) \n shapiro.test (x)`); $ret = $R->rea

Re: how to avoid "spawning" multiple process of the same script ..

2006-08-12 Thread Randal L. Schwartz
> "Christer" == Christer Ekholm <[EMAIL PROTECTED]> writes: Christer> Very elegant. I like that. Unfurtunately I can't get that to work on Christer> HP-UX. A trace with tusc shows that the fcntl syscall on DATA always Christer> fails with errno=9 (EBADF) Christer> Not a big problem, the easy

mp3 and wav

2006-08-12 Thread Perlguru
hot can I play mp3 and wav files with Perl. I am going to write program for Linux and Windows /Raimo -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Dynamic variables - from INI files ...

2006-08-12 Thread Mumia W.
(Re-directed to the list) On 08/12/2006 05:44 AM, [EMAIL PROTECTED] wrote: Hi Mumia, Thanks for your tip, that's a good one ... just need to make some more modifications as below: if ($path =~ m/\Q$ini{"SOURCE_DIR$count"}\E/i) { $TARGET_DIR = $ini{"TARGET_DIR$count"}; } else { $TARGET_DI

Re: Dynamic variables - from INI files ...

2006-08-12 Thread Dr.Ruud
"Mumia W." schreef: > my %ini = split /[ \n=]+/, $data; That would break on an '=' inside a value. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]