Re: about system() call

2018-07-24 Thread Lauren C.
yes I also found a more direct way, use Image::Resize; $image = Image::Resize->new('large.jpg'); $gd = $image->resize(250, 250); thanks for everyone. On 2018/7/25 星期三 PM 1:51, Илья Рассадин wrote: You can resize image with Perl. For example, Imager library can do the thing. See https://metacp

Re: about system() call

2018-07-24 Thread Илья Рассадин
hard, I want to resize batch of images, from the large scale to small one, i.e, this image: https://miscnote.net/wp-content/uploads/2018/07/lauren.jpg (sorry but this is indeed me) currently I use system() in perl to do the work: system "convert lauren.jpg -resize 300x300 lauren.jpg" B

Re: about system() call

2018-07-24 Thread Uri Guttman
indeed me) currently I use system() in perl to do the work: system "convert lauren.jpg -resize 300x300 lauren.jpg" But I think it's not good, since as you said, a shell is always being called. How to write it with pure perl way? that's easy. just call system with a list of t

Re: about system() call

2018-07-24 Thread Lauren C.
Thanks for all kind answers. I have another question that, though this is maybe hard, I want to resize batch of images, from the large scale to small one, i.e, this image: https://miscnote.net/wp-content/uploads/2018/07/lauren.jpg (sorry but this is indeed me) currently I use system() in perl

Re: about system() call

2018-07-24 Thread Uri Guttman
On 07/24/2018 08:35 AM, Lauren C. wrote: Hi, $ perl -le 'system "df -h"' $ perl -le 'system "df","-h"' The both two styles work fine. what's the difference between them and which is better usage? this is a more technical answer than t

Re: about system() call

2018-07-24 Thread Darryl Philip Baker
For security I would add one additional caution. When executing a command wherever possible use the full pathname. To prevent running a malicious file hidden in your PATH. Example: “/bin/ls” and not “ls” Darryl Baker (he/him/his) Sr. System Administrator Distributed Application Platform

Re: about system() call

2018-07-24 Thread Chas. Owens
The first spawns a shell and can handle things like globs. This is less efficient, more powerful, and more dangerous (susceptible to code injection attacks) The second does not spawn a shell and therefore cannot handle globs. It is also less susceptible to code injection attacks. system &qu

about system() call

2018-07-24 Thread Lauren C.
Hi, $ perl -le 'system "df -h"' $ perl -le 'system "df","-h"' The both two styles work fine. what's the difference between them and which is better usage? thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For ad

Re: perlapi overrides system read()/ioctl() methods

2016-05-12 Thread Uri Guttman
On 05/12/2016 04:15 PM, Timothy Madden wrote: Hello I am trying to write an extension module (uses native C code) and I notice after including , that POSIX read() function is now overriden by a Perl macro. Can I find this explained somewhere please ? Is it safe to ignore ? Should I #undef

perlapi overrides system read()/ioctl() methods

2016-05-12 Thread Timothy Madden
Hello I am trying to write an extension module (uses native C code) and I notice after including , that POSIX read() function is now overriden by a Perl macro. Can I find this explained somewhere please ? Is it safe to ignore ? Should I #undef it, or should I create a separate .c file without ju

Re: Best practice for executing system commands?

2015-01-24 Thread Uri Guttman
On 01/24/2015 09:13 AM, Mike wrote: Which is generally considered the best practice way of executing system commands from within a Perl program? Should I use backticks or qx//, system(), or exec()? Or is there no "best way" and it's just a matter of what you want to return

Re: Best practice for executing system commands?

2015-01-24 Thread Shlomi Fish
Hi Mike, On Sat, 24 Jan 2015 08:13:38 -0600 Mike wrote: > Which is generally considered the best practice way of executing system > commands from within a Perl program? > > Should I use backticks or qx//, system(), or exec()? > > Or is there no "best way" and it

Best practice for executing system commands?

2015-01-24 Thread Mike
Which is generally considered the best practice way of executing system commands from within a Perl program? Should I use backticks or qx//, system(), or exec()? Or is there no "best way" and it's just a matter of what you want to return? -- To unsubscribe, e-mail: beg

Re: Solved mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-31 Thread Jan Gruber
Hi Martin, > I feel embarrassed for wasting everybody's time, but I > really appreciate the help. sometimes one needs to think out loud to solve a problem. I had a lot of problems like this one where it helped to get feedback from this list. Regards, Jan -- Paranoia is simply an optimist

Re: Solved mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-31 Thread Jan Gruber
Hi Martin, > I feel embarrassed for wasting everybody's time, but I > really appreciate the help. sometimes one needs to think out loud to solve a problem. I had a lot of problems like this one where it helped to get feedback from this list. Regards, Jan -- Paranoia is simply an optimis

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Shawn H Corey
On Thu, 30 Jan 2014 07:47:29 -0600 "Martin G. McCormick" wrote: > David Precious writes: > > change "system" to "print" to print out the command that would be > > run, > > Great suggestion! I actually did try that using echo instead of >

Solved mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Martin G. McCormick
This is a classic example of the admonition, "Never trust data." I did try the following: David Precious writes: > change "system" to "print" to print out the command that would be run, > and (a) you'll likely see the problem, or (b)

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Martin G. McCormick
it more clear later when the $filename is > added. You'll see in a previous message that I really goofed. The $filename variable contained the correct string but also contained a newline at the end so chomp was in order. I removed all quotes except for the beginning and en

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Martin G. McCormick
David Precious writes: > change "system" to "print" to print out the command that would be run, Great suggestion! I actually did try that using echo instead of print so that system was still involved and the values were correct. It looked beautiful. > and (a) you'l

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Ron Bergin
it works. > > The perl script is not trying to run suid to root. I am > root when I call it. The line in question reads: > > system( > "mv $directories$filename \"$directories\"deleted_keys/" > ); > > $directories and $filename are correctly set at

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Charles DeRykus
a > permission denied. If I su to root and manually make the move, > it works. > > The perl script is not trying to run suid to root. I am > root when I call it. The line in question reads: > > system( > "mv $directories$filename \"$directories\"deleted_

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Hal Wigoda
g the "Usage" help message and a > permission denied. If I su to root and manually make the move, > it works. > >The perl script is not trying to run suid to root. I am > root when I call it. The line in question reads: > > system( > "mv $director

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread David Precious
On Wed, 29 Jan 2014 16:10:25 -0600 "Martin G. McCormick" wrote: > I keep getting the "Usage" help message and a > permission denied. If I su to root and manually make the move, > it works. change "system" to "print" to print out the command

mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Martin G. McCormick
un suid to root. I am root when I call it. The line in question reads: system( "mv $directories$filename \"$directories\"deleted_keys/" ); $directories and $filename are correctly set at the time. The output from the script is: usage: mv [-f | -i | -n] [-v] source target

Re: [OT] SurfShopPRO Perl shopping cart system is now open source

2013-11-19 Thread SSC_perl
On Nov 19, 2013, at 8:40 AM, Jim Gibson wrote: > That’s all the analysis I have time for. I really appreciate the analysis. It gives me a lot to go on. Thanks, Frank

Re: [OT] SurfShopPRO Perl shopping cart system is now open source

2013-11-19 Thread SSC_perl
On Nov 19, 2013, at 3:17 AM, John W. Krahn wrote: > readdir() returns just the file names, without the path. Thanks, John. I didn't realize that. This morning, I found http://perldoc.perl.org/functions/readdir.html and read the following: "If you're planning to filetest the return valu

Re: [OT] SurfShopPRO Perl shopping cart system is now open source

2013-11-19 Thread Jim Gibson
On Nov 18, 2013, at 2:02 PM, SSC_perl wrote: >> Surf.pm:65: $cookie =~ Encode($cookie); >> Surf.pm:66: $value =~ Encode($value); >> Did you really mean to use the return value from Encode() as a regular >> expression? > > > Unfortunately, I can't answer this, as

Re: [OT] SurfShopPRO Perl shopping cart system is now open source

2013-11-19 Thread John W. Krahn
SSC_perl wrote: Hi John, Hello, Thanks for getting back to me with your findings. I really appreciate it. I've gone through everything, made the changes that I could, and I have some questions to some of your remarks. You are using the value from readdir() without prepending the

Re: [OT] SurfShopPRO Perl shopping cart system is now open source

2013-11-18 Thread Jim Gibson
On Nov 18, 2013, at 2:02 PM, SSC_perl wrote: > Hi John, > > Thanks for getting back to me with your findings. I really appreciate > it. I've gone through everything, made the changes that I could, and I have > some questions to some of your remarks. You should be responding to the lis

Re: [OT] SurfShopPRO Perl shopping cart system is now open source

2013-11-18 Thread SSC_perl
Hi John, Thanks for getting back to me with your findings. I really appreciate it. I've gone through everything, made the changes that I could, and I have some questions to some of your remarks. > You are using the value from readdir() without prepending the path to the > file name.

Re: [OT] SurfShopPRO Perl shopping cart system is now open source

2013-11-14 Thread John W. Krahn
SSC_perl wrote: Hello, Hello, This is a one-time post to announce that the SurfShopPRO Perl shopping cart system is going open source. Our site hasn't been fully updated yet, but you can download the cart and check it our for yourself. We are looking for developers, desi

[OT] SurfShopPRO Perl shopping cart system is now open source

2013-10-28 Thread SSC_perl
Hello, This is a one-time post to announce that the SurfShopPRO Perl shopping cart system is going open source. Our site hasn't been fully updated yet, but you can download the cart and check it our for yourself. We are looking for developers, designers, and testers.

Re: what's the problem with a system call

2013-05-16 Thread Manuel Reimer
Shlomi Fish wrote: What system() does (at least on UNIX-like OSes) is fork a child, call exec() with a new process and wait for the new child to terminate (plus some other stuff to get rid of misbehaviours). ... and if you call "system" with just one long string, then Perl opens t

Re: what's the problem with a system call

2013-05-14 Thread Shlomi Fish
Hi xiaolan, On Tue, 14 May 2013 18:51:51 +0800 xiaolan wrote: > Thanks all the answers. > Shlomi long time no see :) Yes. :-) I am available on IM: http://www.shlomifish.org/me/contact-me/ > > Have another question that, what's the difference between the system call > c

Re: what's the problem with a system call

2013-05-14 Thread xiaolan
Thanks all the answers. Shlomi long time no see :) Have another question that, what's the difference between the system call child process and the native forked child process? Does the child process of system call have the problems of receiving signals from the parent? On Tue, May 14,

Re: what's the problem with a system call

2013-05-14 Thread Shlomi Fish
Hi Brian, thanks for replying well to xiaolan’s question. Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ My Public Domain Photos - http://www.flickr.com/photos/shlomif/ 95% of Programmers consider

Re: what's the problem with a system call

2013-05-14 Thread Brian Fraser
On Tue, May 14, 2013 at 12:35 AM, xiaolan wrote: > Hello, > > what's the disadvantage when calling a system command from Perl? > i.e, system call to "rsync" rather than using the File::Rsync module. > is it hard to control the signals between the caller process a

Re: what's the problem with a system call

2013-05-13 Thread Luca Ferrari
On Tue, May 14, 2013 at 5:35 AM, xiaolan wrote: > Hello, > > what's the disadvantage when calling a system command from Perl? > i.e, system call to "rsync" rather than using the File::Rsync module. > is it hard to control the signals between the caller process a

what's the problem with a system call

2013-05-13 Thread xiaolan
Hello, what's the disadvantage when calling a system command from Perl? i.e, system call to "rsync" rather than using the File::Rsync module. is it hard to control the signals between the caller process and the called system command? Thanks.

Re: check processes accessing file system

2013-01-10 Thread Paul.G
thanks From: David Precious To: beginners@perl.org Sent: Friday, 11 January 2013 12:07 AM Subject: Re: check processes accessing file system On Thu, 10 Jan 2013 05:01:38 -0800 (PST) "Paul.G" wrote: > Linux/Unix you would use. > > eg: &

Re: check processes accessing file system

2013-01-10 Thread David Precious
On Thu, 10 Jan 2013 05:01:38 -0800 (PST) "Paul.G" wrote: > Linux/Unix you would use. > > eg: > fuser -c /tmp > or > lsof could also be used. > > > I was wondering if there was a perl module that does the same thing. See Unix::Lsof then, as per my reply - it should do what you need. -- To u

Re: check processes accessing file system

2013-01-10 Thread Paul.G
processes accessing file system On Wed, 9 Jan 2013 17:45:51 -0800 (PST) "Paul.G" wrote: > Is there a quck way to test if processes are accessing file system in > perl? That's quite a vague requirement. Find out what processes have a specific file open? Find out what proc

Re: check processes accessing file system

2013-01-10 Thread Shlomi Fish
Hi Paul, On Wed, 9 Jan 2013 17:45:51 -0800 (PST) "Paul.G" wrote: > Hi > > Is there a quck way to test if processes are accessing file system in perl? > If you are using Linux you can use: * https://metacpan.org/search?q=inotify I think the *BSDs have some similar m

Re: check processes accessing file system

2013-01-10 Thread David Precious
On Wed, 9 Jan 2013 17:45:51 -0800 (PST) "Paul.G" wrote: > Is there a quck way to test if processes are accessing file system in > perl? That's quite a vague requirement. Find out what processes have a specific file open? Find out what processes are doing IO at that spec

check processes accessing file system

2013-01-09 Thread Paul.G
Hi Is there a quck way to test if processes are accessing file system in perl? cheers Paul

sudo module; how to use on remote system

2012-09-30 Thread Rajeev Prasad
Hello Joe, How to use your module on a remote system? module is not installed on remote system, but on my local machine. i am usinf net::openssh to connect to remote system. tx. Rajeev

Re: system command not working in different versions

2012-08-09 Thread Shawn H Corey
a difference in the environments between your login > and the user that actually executes the script. But that doesn't determine which shell system() uses. Most users are automatically assign bash(1) as their default shell. Most perls use sh(1). On my machine, sh(1) is symbolically l

RE: system command not working in different versions

2012-08-09 Thread Bob McConnell
> From: Shawn H Corey > > On Thu, 9 Aug 2012 15:17:57 +0800 (SGT) > venki neeli wrote: > > > What may be the problem? is it with version of perl? or perl module > > problem? > > It may be a difference in the shell. When there are metacharacters > present,

Re: system command not working in different versions

2012-08-09 Thread Shawn H Corey
On Thu, 9 Aug 2012 15:17:57 +0800 (SGT) venki neeli wrote: > What may be the problem? is it with version of perl? or perl module > problem? It may be a difference in the shell. When there are metacharacters present, system uses sh(1) to interpret them. Try this on your machines to

Re: system command not working in different versions

2012-08-09 Thread Paul Anderson
> > From: midhun > To: Hal Wigoda > Cc: venki neeli ; perl list > Sent: Thursday, 9 August 2012 12:01 PM > Subject: Re: system command not working in different versions > > Neeli, Hal is right. Try $which perl from your shell. The location

Re: system command not working in different versions

2012-08-09 Thread venki neeli
roblem? is it with version of perl? or perl module problem? Regards, Neeli From: midhun To: Hal Wigoda Cc: venki neeli ; perl list Sent: Thursday, 9 August 2012 12:01 PM Subject: Re: system command not working in different versions Neeli, Hal is right.

Re: system command not working in different versions

2012-08-08 Thread midhun
> > > > > From: midhun > > To: venki neeli > > Cc: perl list > > Sent: Wednesday, 8 August 2012 3:55 PM > > Subject: Re: system command not working in different versions > > > > One suggestion. Did you compare

Re: system command not working in different versions

2012-08-08 Thread Hal Wigoda
ow.pl) are in same location. > > Regards, > Neeli > > > > From: midhun > To: venki neeli > Cc: perl list > Sent: Wednesday, 8 August 2012 3:55 PM > Subject: Re: system command not working in different versions > > One suggestion. Did

Re: system command not working in different versions

2012-08-08 Thread Owen
> From: midhun > To: venki neeli > Cc: perl list > Sent: Wednesday, 8 August 2012 3:55 PM > Subject: Re: system command not working in different versions > > One suggestion. Did you compare the shebang line of your submit_now.pl > and > your perl executable loca

Re: system command not working in different versions

2012-08-08 Thread venki neeli
August 2012 3:55 PM Subject: Re: system command not working in different versions One suggestion. Did you compare the shebang line of your submit_now.pl and your perl executable location in the 2nd machine where it is not working. Regards, Midhun On Wed, Aug 8, 2012 at 11:48 AM, venki neeli

Re: system command not working in different versions

2012-08-08 Thread Shawn H Corey
eli > wrote: > > > Dear Friends, > > > > I am developing a script in which I need to call another perl > > script. In one linux machine it is working and in the other machine > > it is not working. > > > > Ex:- system("./submit_now.pl $&qu

Re: system command not working in different versions

2012-08-08 Thread midhun
l another perl script. > In one linux machine it is working and in the other machine it is not > working. > > Ex:- system("./submit_now.pl $"); > > can you please, tell me what is the reason? > and as well solution. > > Regards, > Neeli -- -Midhun

Re: system command not working in different versions

2012-08-07 Thread Jeff Pang
You might want to tell us what's the output for error. Some reasons include the file path, the permissions etc. I am developing a script in which I need to call another perl script. In one linux machine it is working and in the other machine it is not working. Ex:- system("./sub

system command not working in different versions

2012-08-07 Thread venki neeli
Dear Friends, I am developing a script in which I need to call another perl script. In one linux machine it is working and in the other machine it is not working. Ex:- system("./submit_now.pl $"); can you please, tell me what is the reason? and as well solution. Regards, Neeli

Re: File health check on *nix system using stat

2011-12-12 Thread Peter Scott
On Sun, 11 Dec 2011 10:40:24 -0400, frank cui wrote: > Ok, to make this question more specific, the author of this book is > making a program to check if the files can be read off from the disk. > And he does so by checking two steps, first is making sure the meta data > of this file looks fine, an

Re: File health check on *nix system using stat

2011-12-12 Thread John W. Krahn
would probably only need to read one byte to see if the file is readable. He is checking that the operating system returns the same number of bytes that stat says the file contains. And you couldn't confirm that by seeking to the end of the file and reading one byte because there may be in

Re: File health check on *nix system using stat

2011-12-11 Thread frank cui
Thanks John and Peter for the reply. Ok, to make this question more specific, the author of this book is making a program to check if the files can be read off from the disk. And he does so by checking two steps, first is making sure the meta data of this file looks fine, and secondly by reading b

Re: File health check on *nix system using stat

2011-12-10 Thread Peter Scott
On Sat, 10 Dec 2011 11:11:15 -0400, frank cui wrote: > # attempt to read the directory entry for this file my @stat = > stat($name); > if ( !$stat[4] && !$stat[5] && !$stat[6] && !$stat[7] && !$stat[8] ) { > return 0;# according to the code context, here > it is saying the f

Re: File health check on *nix system using stat

2011-12-10 Thread John W. Krahn
frank cui wrote: hi, Hello, I'm reading the book of "automating system administration with perl" and having doubts about this code snippets about file health check. # attempt to read the directory entry for this file my @stat = stat($name); That should probably be: my @st

File health check on *nix system using stat

2011-12-10 Thread frank cui
hi, I'm reading the book of "automating system administration with perl" and having doubts about this code snippets about file health check. # attempt to read the directory entry for this file my @stat = stat($name); if ( !$stat[4] && !$stat[5] && !$stat[6] &&a

RE: system command question

2011-09-28 Thread Ken Slater
> -Original Message- > From: Amish Rughoonundon [mailto:amishrughoonun...@gmail.com] > Sent: Tuesday, September 27, 2011 4:44 PM > To: beginners@perl.org > Subject: system command question > > Hi, > I am trying to run a make file from perl. For the make file to

system command question

2011-09-28 Thread Amish Rughoonundon
do this in perl using a system call but it failed system("SET A_DIR=C:\\TOOLS\\TMS320 & SET C_DIR=C:\\TOOLS\\TMS320 & PATH=\%PATH\%;C:\\TOOLS;C:\\TOOLS\\TMS320 & make > compilation_output.txt"); Any idea why the system command is not setting the path and A_DIR and C_DIR

Re: redirect system command STDER

2011-07-20 Thread C.DeRykus
On Jul 20, 12:45 am, walde.christ...@googlemail.com ("Christian Walde") wrote: > On Tue, 19 Jul 2011 21:14:10 +0200, Tessio Fechine wrote: > > Hello, > > I have a subroutine that uses useradd to create accounts > > > -- > > @cmd = ('useradd&#x

Fw: redirect system command STDER

2011-07-20 Thread Shlomi Fish
2911BD47; Wed, 20 Jul 2011 12:42:45 +0300 (IDT) Date: Wed, 20 Jul 2011 12:42:45 +0300 From: Shlomi Fish To: Jim Gibson Cc: Subject: Re: redirect system command STDER Message-ID: <20110720124245.0192b...@telaviv1.shlomifish.org> In-Reply-To: References: X-Mailer: Claws M

Re: redirect system command STDER

2011-07-20 Thread Shlomi Fish
Hi Jim, On Tue, 19 Jul 2011 16:22:14 -0700 Jim Gibson wrote: > On 7/19/11 Tue Jul 19, 2011 12:14 PM, "Tessio Fechine" > scribbled: > > > Hello, > > I have a subroutine that uses useradd to create accounts > > > > -- > > @cmd = ('u

Re: redirect system command STDER

2011-07-20 Thread Kevin Spencer
On Tue, Jul 19, 2011 at 12:14 PM, Tessio Fechine wrote: > Hello, > I have a subroutine that uses useradd to create accounts > > -- > @cmd = ('useradd', '-m', $account); > my $result = system @cmd; > -- > > but when useradd fails, I need to stop it

Re: redirect system command STDER

2011-07-20 Thread Christian Walde
On Tue, 19 Jul 2011 21:14:10 +0200, Tessio Fechine wrote: Hello, I have a subroutine that uses useradd to create accounts -- @cmd = ('useradd', '-m', $account); my $result = system @cmd; -- but when useradd fails, I need to stop it from sending the error message to STDER.

Re: redirect system command STDER

2011-07-19 Thread Jim Gibson
On 7/19/11 Tue Jul 19, 2011 12:14 PM, "Tessio Fechine" scribbled: > Hello, > I have a subroutine that uses useradd to create accounts > > -- > @cmd = ('useradd', '-m', $account); > my $result = system @cmd; > -- > > but when useradd f

redirect system command STDER

2011-07-19 Thread Tessio Fechine
Hello, I have a subroutine that uses useradd to create accounts -- @cmd = ('useradd', '-m', $account); my $result = system @cmd; -- but when useradd fails, I need to stop it from sending the error message to STDER. Is it possible with system? Thanks!

Re: Loading library different per Operating System

2011-06-12 Thread JPH
Here is how I solved it: use if $^O eq "linux" , "Device::SerialPort" => qw( :PARAM :STAT 0.07 ); use if $^O eq "MSWin32" , "Win32::SerialPort" => qw( :PARAM :STAT 0.19 ); Thanks! On 06/12/2011 03:13 AM, Dr.Ruud wrote: On 2011-06-11 17:20, JP wrote: How can I load a library depending on

Re: Loading library different per Operating System

2011-06-11 Thread Dr.Ruud
On 2011-06-11 17:20, JP wrote: How can I load a library depending on the platform I run on? A use statement is always processed at compile time, no matter if there are BEGIN blocks or if statements around it, or where it is in the source. Check out "use if" (see perldoc if), or do the strin

Re: Loading library different per Operating System

2011-06-11 Thread Shawn H Corey
in32::SerialPort qw( :PARAM :STAT 0.07 ); } else { die "Unsupported Operating System: $OSNAME\n"; }; } -- Just my 0.0002 million dollars worth, Shawn Confusion is the first step of understanding. Programming is as much about organization and communication as it i

Loading library different per Operating System

2011-06-11 Thread JP
rialPort qw( :PARAM :STAT 0.07 ); } elsif ( $OS eq "MSWin32" ) { use Win32::SerialPort qw( :PARAM :STAT 0.07 ); } else { die "Unsupported Operating System: $OS\n"; }; But the loading of the libraries is done during compile and therefore this will allways fail with an "Can&#

Re: Rsync options not recognized by system function

2011-05-31 Thread Chris Nehren
On Fri, May 27, 2011 at 14:10:16 -0700 , John W. Krahn wrote: > > The real problem is that $RSYNC_OPTS contains whitespace and you > can't mix system(LIST) and system(STRING) together like that. It has > to be either: > > system($RSYNC, split( ' ', $RSYNC

Re: Rsync options not recognized by system function

2011-05-27 Thread John W. Krahn
Uri Guttman wrote: "ET" == Ezra Taylor writes: ET> Hello All: ET> My rsync options are not being recognized in the system ET> function. I tried escaping the asterisks and single quotes to no avail. ET> Also, I do not want to install an

Re: Rsync options not recognized by system function

2011-05-27 Thread Uri Guttman
>>>>> "ET" == Ezra Taylor writes: ET> Hello All: ET> My rsync options are not being recognized in the system ET> function. I tried escaping the asterisks and single quotes to no avail. ET> Also, I do not want to install any rsync

Re: Rsync options not recognized by system function

2011-05-27 Thread Kenneth Wolcott
On Fri, May 27, 2011 at 12:10, Ezra Taylor wrote: > Hello All: >                My rsync options are not being recognized in the system > function.  I tried escaping the asterisks and single quotes to no avail. > Also, I do not want to install any rsync modules.  Your help

Rsync options not recognized by system function

2011-05-27 Thread Ezra Taylor
Hello All: My rsync options are not being recognized in the system function. I tried escaping the asterisks and single quotes to no avail. Also, I do not want to install any rsync modules. Your help will be much appreciated. Thanks. my $RSYNC_OPTS=' -auvr --in

Re: Perl For system admin

2011-05-25 Thread Shlomi Fish
Hi Fudmer, next time, please reply to all recipients and don't send the reply only to me. See below for my response: On Wednesday 25 May 2011 13:53:53 fudmer rieley wrote: > I c/n get the referenced link to open.. said page not found? > http://search.cpan.org/~abigail/Regexp-Common-2011041701/li

Re: Perl For system admin

2011-05-24 Thread Shlomi Fish
Hi Shawn (and all), On Tuesday 24 May 2011 15:05:06 Shawn H Corey wrote: > On 11-05-24 12:10 AM, vishesh kumar wrote: > > Hi Members, > > > > I am a linux system admin. I want to use perl as a command line like > >sed > > > > and awk. > > Fo

Re: Perl For system admin

2011-05-24 Thread Shawn H Corey
On 11-05-24 12:10 AM, vishesh kumar wrote: Hi Members, I am a linux system admin. I want to use perl as a command line like sed and awk. For example suppose , i need to extract IP Addr from a string or file using regrex i mean str="hello ip is 192.168.2.1 and data is xxx" And

Perl For system admin

2011-05-23 Thread vishesh kumar
Hi Members, I am a linux system admin. I want to use perl as a command line like sed and awk. For example suppose , i need to extract IP Addr from a string or file using regrex i mean str="hello ip is 192.168.2.1 and data is xxx" And i want ip addr only using Regex echo $str

Re: format output from system command

2011-04-16 Thread Peter Scott
On Fri, 15 Apr 2011 08:53:12 -0700, sono-io wrote: > On Apr 15, 2011, at 8:37 AM, Alan Haggai Alavi wrote: > >>> open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n"; >>> >>> Is that O.K.? >> >> You are still using a bareword filehandle. > > Putting single quotes around t

Re: format output from system command

2011-04-15 Thread Shawn H Corey
On 11-04-15 11:22 AM, sono...@fannullone.us wrote: open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n"; Is that O.K.? The problem with not using lexical-scoped file handles is that if a module opens a file using the same name, it closes yours. It's best if you limit the

Re: format output from system command

2011-04-15 Thread sono-io
On Apr 15, 2011, at 8:37 AM, Alan Haggai Alavi wrote: >> open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n"; >> >> Is that O.K.? > > You are still using a bareword filehandle. Putting single quotes around the filehandle allows it to pass Perl Critic, so I was just cu

Re: format output from system command

2011-04-15 Thread Alan Haggai Alavi
Hello Marc, What about writing it like this: open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n"; Is that O.K.? You are still using a bareword filehandle. Regards, Alan Haggai Alavi. -- The difference makes the difference -- To unsubscribe, e-mail: beginners-un

Re: format output from system command

2011-04-15 Thread sono-io
On Apr 15, 2011, at 2:11 AM, Shlomi Fish wrote: > 1. Don't use bareword file-handles. > > 2. Use the three-args open: > > open (my $file_our, '>>', 'cmdout') or die "Cannot open cmdout: $!"; What about writing it like this: open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \

Re: format output from system command

2011-04-15 Thread Shlomi Fish
Hi jet speed, On Friday 15 Apr 2011 00:23:17 jet speed wrote: > Hi, > > I need help in formatting ouput from system command, i could'nt figure out > a way to format output from system command. appreciate your help with > this, the details are below. > > hlis3 is

format output from system command

2011-04-14 Thread jet speed
Hi, I need help in formatting ouput from system command, i could'nt figure out a way to format output from system command. appreciate your help with this, the details are below. hlis3 is file with list of clients hosta hostb hostc hostd The below program looks through each client and ou

format output from system command

2011-04-14 Thread jet speed
Hi, I need help in formatting ouput from system command, i could'nt figure out a way to format output from system command. appreciate your help with this, the details are below. hlis3 is file with list of clients hosta hostb hostc hostd The below program looks through each client and ou

Re: Accessing file system from CGI

2010-11-20 Thread Mike Martin
>> suite), but I am hitting the "permission denied" issue. >> > > What does the system that runs this CGI program is running (operating system, > distribution, version, etc.)? Did you try it at home? > >> This applies to ls, opendir and find. > > Well, y

Re: Accessing file system from CGI

2010-11-19 Thread Shlomi Fish
the necessary UNIX-wise permissions. However, note that many web-servers will run CGI scripts under a very unprivileged UNIX user. > I am working on a doc viewer app (intended for release as part of a > suite), but I am hitting the "permission denied" issue. > What does the

Re: Accessing file system from CGI

2010-11-19 Thread Jeff Pang
You may make the filesystem readable to httpd's running user like nobody. Perl has no way doing something more effective. 2010/11/18 Mike Martin : > Has anyone got any approaches that enable cgi scripts to access the > host filesystem (readonly) > > I am working on a doc viewer app (intended for

Accessing file system from CGI

2010-11-19 Thread Mike Martin
Has anyone got any approaches that enable cgi scripts to access the host filesystem (readonly) I am working on a doc viewer app (intended for release as part of a suite), but I am hitting the "permission denied" issue. This applies to ls, opendir and find. any ideas appreciated -- To unsubscri

Re: How to copy and execute a file from source host to a remote windows system using perl ?

2010-10-29 Thread Shlomi Fish
Hi Amit, On Thursday 28 October 2010 16:04:22 Amit Saxena wrote: > Hi all, > > Please let me know a way to copying from source host and executing a file > on a remote windows system using perl when > > 1. When the password of "administrator" account on the remote h

  1   2   3   4   5   6   7   8   9   10   >