AW: Substition string in a variable?

2010-03-07 Thread HACKER Nora
Hi list, I haven't received any response to my last mail - does really nobody have any idea for a solution to my problem (see below)? I would very much appreciate any input. Regards, Nora > > However, part of the answer is knowing the question. If this doesn't > > do the trick for you, a more

Re: Test if directory is not empty

2010-03-07 Thread Harry Putnam
Shawn H Corey writes: > Harry Putnam wrote: >> So it needs to be up to the user but most often any files in the >> directory will not be of concern. In fact, thinking about that the script should not only ask permission, but should probably should offer to clear the directory before making a

Re: question on software development

2010-03-07 Thread Randal L. Schwartz
> "ANJAN" == ANJAN PURKAYASTHA writes: ANJAN> OK, suppose I develop a Perl application. I want to create an icon for the ANJAN> program so that a user may download the program and start it in the GUI by ANJAN> double-clicking on the icon. Did I miss something? Where did you say "windows"

Re: Test if directory is not empty

2010-03-07 Thread Shawn H Corey
Harry Putnam wrote: > So it needs to be up to the user but most often any files in the > directory will not be of concern. Well, if you're not worried about hidden files, you could use glob: my $count = scalar glob( "$dir/*" ); -- Just my 0.0002 million dollars worth, Shawn Programming

Re: Test if directory is not empty

2010-03-07 Thread Harry Putnam
"Uri Guttman" writes: >> "HP" == Harry Putnam writes: > > HP> But all I'm asking here is for the easiest way to see if the receiving > HP> directory is empty. > > HP> The code I've devised seems pretty clunky (I haven't tested the script > HP> yet since I'm writing several other part

Re: Test if directory is not empty

2010-03-07 Thread Harry Putnam
Robert Wohlfarth writes: > The "-e" test will tell you if the target file already exists. For example: > if (-e $copyToFile) { > # Add extension here... > } Nice... much better. That test would come in handy instead of comparing the whole list of files to the current one incoming. It wou

Re: Sharing Object::InsideOut object between threads

2010-03-07 Thread menth0l
I've contacted module author on that matter and it turned out there was a bug in OIO 3.59. Fixed version 3.63 is already available on CPAN. -- menth0l -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Test if directory is not empty

2010-03-07 Thread Robert Wohlfarth
On Sun, Mar 7, 2010 at 11:37 AM, Harry Putnam wrote: > I want to know if the receiving directory is empty of actual files. > Since if it is not; then first the user must be asked if she wants to > continue, if so, then a subfunction must be employed to ensure nothing > is clobbered. > > The subfu

Re: Test if directory is not empty

2010-03-07 Thread Uri Guttman
> "HP" == Harry Putnam writes: HP> But all I'm asking here is for the easiest way to see if the receiving HP> directory is empty. HP> The code I've devised seems pretty clunky (I haven't tested the script HP> yet since I'm writing several other parts right now, so not even sure HP>

Re: Test if directory is not empty

2010-03-07 Thread Harry Putnam
Shawn H Corey writes: Harry Putnam wrote: >> Is there a simple test to determine if a directory is empty or not? >> >> Or do you have to opendir, readdir, or something similar with a full >> block. >> >> > > That depends on what you mean by empty. On Linux, even empty > directories have . an

Re: Controlling one process depending on the status of another

2010-03-07 Thread Dr.Ruud
Jeremiah Foster wrote: "Unix processes are one of two techniques for achieving reliable concurrency and parallelism in server applications. Threads are out. You can use processes, or async/events, or both processes and async/events, but definitely not threads. Threads are out." For people w

Re: Can anybody explain me what this shebang line is doing?

2010-03-07 Thread YAPH
> > This isn't a Perl script. This is a shell script to be executed by > whichever shell lives at /usr/bin/sh on your system. It sets the shell > variables ORACLE_HOME and LD_LIBRARY PATH, and then calls /bin/perl to > re-evaluate the file. When the perl interpreter reads the file, it > ignores the

Re: FW: Can anybody explain me what this shebang line is doing?

2010-03-07 Thread YAPH
Thanks Sanket, So if this script is run on a Unix box, everything after the second # would be treated as a comment, right? #!/usr/bin/sh -- # -*- perl -*- So, actually, it's #!/usr/bin/sh -- Isn't it? Regards, -Murali -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additiona

Re: Test if directory is not empty

2010-03-07 Thread Shawn H Corey
Harry Putnam wrote: > Is there a simple test to determine if a directory is empty or not? > > Or do you have to opendir, readdir, or something similar with a full > block. > > That depends on what you mean by empty. On Linux, even empty directories have . and .. Why do you want to test for th

Test if directory is not empty

2010-03-07 Thread Harry Putnam
Is there a simple test to determine if a directory is empty or not? Or do you have to opendir, readdir, or something similar with a full block. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: question on software development

2010-03-07 Thread ANJAN PURKAYASTHA
I completely agree with you Raymond- we should not be pre-judged based on our nationalities or institutional affiliations. Also, IMHO, the only stupid question is the one that is not asked. Forum members, especially beginners, should feel comfortable posting questions without fear of ridicule. Anj