perl system return 256

2010-03-18 Thread syd_p
Hello, I am crafting some perl code: ... system (" /usr/bin/cat /tmp/TT.sql | /tmp/TT.sql"); .. the above code works on Solaris perfectly well in a standalone perl script. ie it inserts a line into a database. when I invoke it in a cgi, although I can build the 2 files in /tmp with an open SQLFILE

Re: no lstat happens

2010-03-18 Thread Harry Putnam
Raymond Wan writes: > > Did you change the lstat to stat like I suggested in my first post? > Are they files or symbolic links? The problem seem to have been solved... see my reply to John K. But to answer your question there... I did try it both ways. It works with either lstat or stat, at l

Re: no lstat happens

2010-03-18 Thread Harry Putnam
"John W. Krahn" writes: > Harry Putnam wrote: >> I've finally gone on around the bend, I guess... I'm not seeing why the >> script below <./t2> doesn't show the value of $mode when fed by >> the ls cmd shown: >> >> (first, to shows whats here) >> >>ls -l *[eo2] >> -rw-r--r--+ 1 reader reade

Re: no lstat happens

2010-03-18 Thread Harry Putnam
"John W. Krahn" writes: > Harry Putnam wrote: >> I've finally gone on around the bend, I guess... I'm not seeing why the >> script below <./t2> doesn't show the value of $mode when fed by >> the ls cmd shown: >> >> (first, to shows whats here) >> >>ls -l *[eo2] >> -rw-r--r--+ 1 reader reade

Re: Save to memory temporarily

2010-03-18 Thread Linux Expert
> > > Not easily. WWW::Mechanize is a LWP::UserAgent; look at the > documentation for that module and see the :content_cb hook. Write a > handler to concatenate data in memory until you reach 10MB and then flush > to disk, writing the remainder there. Set read_size_hint to below 10MB. > > This i

Re: Save to memory temporarily

2010-03-18 Thread Peter Scott
On Wed, 17 Mar 2010 20:19:01 +0530, raphael() wrote: > Hello, > > Is there a way to save/store downloaded data (using WWW::Mechanize) in > memory (temporarily) > rather than writing it to disk. Like store 10MB in memory and then flush > it to the hard disk when data reaches 10MB. Not easily. WW

Re: getting input without hitting return

2010-03-18 Thread Greg
Raymond Wan wrote: Hi Greg, Greg wrote: I have a script, where a user can choose between different options (add user (U), add item (I), search (S)). I want the user to hit either U, I or S. However, right now, he needs to hit return as well. Is there a way to get input without hitting retur

Re: Freeing Memory

2010-03-18 Thread Uri Guttman
> "h" == hsfrey writes: h> I rewrote the thing to use arrays instead of hashes, updating in place h> instead of moving stuff around, and generally using brute force h> instead of cleverness. h> I didn't want to do it that way before, because I was afraid it would h> take too much

Re: Freeing Memory

2010-03-18 Thread hsfrey
OK! I rewrote the thing to use arrays instead of hashes, updating in place instead of moving stuff around, and generally using brute force instead of cleverness. I didn't want to do it that way before, because I was afraid it would take too much time. Anyway now it runs to completion, and takes