A Small Contribution to the List

2014-01-30 Thread Martin G. McCormick
After being informed about the File::Copy module, I started exploring a bit. Since these perl modules have man pages, the apropos command is extremely handy. I tried apropos File:: and found a list of several utilities in that suite which one can then man File::X to learn more about what is there

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 > print so that system was still involved and the values w

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) you can try running that > exact command.

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

2014-01-30 Thread Martin G. McCormick
"Ron Bergin" writes: > As has already been mentioned, part of the problem is your quoting. > > What is the value of $directories and more specifically, does it end with > a forward slash? Personally, I prefer to leave off the trailing dir > separator because IMO it makes it more clear later when

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'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 Ron Bergin
Martin G. McCormick wrote: > I have a perl script that I run as root which needs to > move a file from where it is to another directory. > > I keep getting the "Usage" help message and a > permission denied. If I su to root and manually make the move, > it works. > > The perl scr

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

2014-01-30 Thread Charles DeRykus
On Wed, Jan 29, 2014 at 2:10 PM, Martin G. McCormick < mar...@server1.shellworld.net> wrote: > I have a perl script that I run as root which needs to > move a file from where it is to another directory. > > I keep getting the "Usage" help message and a > permission denied. If I su

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

2014-01-30 Thread Hal Wigoda
Is the directory you are moving to writable? Sent from my iPad > On Jan 29, 2014, at 4:10 PM, "Martin G. McCormick" > wrote: > >I have a perl script that I run as root which needs to > move a file from where it is to another directory. > >I keep getting the "Usage" help message and a

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 that would be run, and (a) you'll likely see the

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

2014-01-30 Thread Martin G. McCormick
I have a perl script that I run as root which needs to move a file from where it is to another directory. I keep getting 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 ro

Re: baby perl to get the right date

2014-01-30 Thread Jim Gibson
On Jan 27, 2014, at 11:32 PM, Luca Ferrari wrote: > Hi all, > often I find myself writing something like the following to get the > "human" date: > > my ($day, $month, $year) = (localtime())[3..5]; > $month++, $year += 1900; > print "\nToday is $month / $day / $year \n"; > > > I was wondering