Re: need help decompose word

2003-08-18 Thread Bernhard van Staveren
> my $text = ' Anthony Bob '; > > my @letters = $text =~ /[[:alpha:]]/g; > > print "$_\n" for @letters; This works too (at least, works for me): my $text='Anthony Bob'; my @letters=split(//, $text); print(join("\n", @letters)); -

Re: Localtime minutes before or after

2003-08-17 Thread Bernhard van Staveren
ded to the current time). -- Bernhard van Staveren - madcat(at)ghostfield.com GhostField Internet - http://www.ghostfield.com/ "A witty saying proves nothing, but damn it's funny!" - me, 1998 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: exec() confirmation

2003-06-30 Thread Bernhard van Staveren
that wouldn't have the effect you wanted. If you want to run the commands one after the other, use system() instead, just make sure that the input isn't actually going to do anything crazy (like rm -rf /). Optionally, you can use exec() but then you'll have to fork() first, and th

Re: Cant seem to understand

2003-06-06 Thread Bernhard van Staveren
un 2003, John W. Krahn wrote: > Bernhard Van Staveren wrote: > > > > There is an easier way (sorta) to get hours/minutes/seconds; > > > > ($seconds, $minutes, $hours)=splice(localtime(), 0, 3); > > Did you try this? No, I didn't think so. :-) > > splice()

Re: Cant seem to understand

2003-06-06 Thread Bernhard van Staveren
> thanks a lot frank..i think i hav got the thing. > > Regards > > Saurabh There is an easier way (sorta) to get hours/minutes/seconds; ($seconds, $minutes, $hours)=splice(localtime(), 0, 3); -- Bernhard van Staveren - madcat(at)ghostfield.com GhostField Intern

Re: Shifting

2003-02-26 Thread Bernhard van Staveren
splice is your friend :) splice(@data, 0, 9); will solve all your problems ;) On Tue, 25 Feb 2003, dan wrote: > Hi, > > I've come across a dilemma, I can solve it the long way round, I'm enquiring > if there's a shorter way to do this. > > I have an array, @data, which contains a lot of data w

Re: File Manipulation Program

2003-02-24 Thread Bernhard van Staveren
ome up with any way to determine whether a PDF file is complete or not, but if there's a perl PDF library available somewhere I'm sure it can be of use .. I just don't know if there is one :) -- Bernhard van Staveren - madcat(at)ghostfield.com GhostField Internet - http://www

Re: Help need in GUI

2003-02-24 Thread Bernhard van Staveren
ole UI part, and put in the appropriate code later. That's about all I have on GUI stuff, hope it helps -- Bernhard van Staveren - madcat(at)ghostfield.com GhostField Internet - http://www.ghostfield.com/ "A witty saying proves nothing, but damn it's funny!" - me, 1

Re: Help with printing 2 files into 1 [OT]

2003-02-18 Thread Bernhard van Staveren
> I got my first real programming job in a shop that was all K&R C with > tons of legacy code written by people who had taught themselves the > language Believe me, I hacked like a machete never could, and > statements like > > band = intmax(strtok(NULL,seps)[0]-64,0); > > were considered *qu

Re: Help with printing 2 files into 1 [OT]

2003-02-18 Thread Bernhard van Staveren
> That's pretty common. A guy in our office prefers: > > my $doc = "\n"; > $doc .= "\tThe various lines of text his program will print\n"; > $doc .= "\tif you call it with no arguments, which he types\n"; > $doc .= "\tin quotes and indiviually appends with the dot op\n"; > $doc .= "\n"; >

Re: Help with printing 2 files into 1

2003-02-17 Thread Bernhard van Staveren
I guess our definitions of unreadable differ in that case; I have my style of writing things, you have yours - and such is life. The extra spaces get on my tits pretty much, and it's perfectly readable without it, IMHO. On Mon, 17 Feb 2003, R. Joseph Newton wrote: > HI Bernard, > > Quick and Dir

Re: Help with printing 2 files into 1

2003-02-17 Thread Bernhard van Staveren
> file_1: > 12 > 13 > 14 > 3 > > file_2: > 3 > 45 > 34 > 56 A real quick and dirty way of doing it: -- 8< -- use strict; open(FONE, $ARGV[0]); open(FTWO, $ARGV[1]); open(FOUT, ">$ARGV[2]"); my @f1; my @f2; my $c=0; chomp(@f1=); chomp(@f2=); close(FONE); close(FTWO); for($c=0;$chttp://www.gho

Re: Out Of memory

2003-02-17 Thread Bernhard van Staveren
ache and the server itself will get bogged down seriously when you get the out of memory deal, since at that point it'll already have used up all the swap space. It makes the server very unhappy :) -- Bernhard van Staveren - madcat(at)ghostfield.com GhostField Internet - http:/

Re: session ID

2003-02-14 Thread Bernhard van Staveren
> Still a little bit confused; > So what if someone just creates an HTML with a hidden field containing any > "login:time" plus another hidden with MD5 hash made out of his own > IP+login+time and submits it? Then they just bypassed your security :) The thing is that you take a string built out of

Re: session ID

2003-02-12 Thread Bernhard van Staveren
e hard; there is yet another way around it but it's not real 'beginner' material and requires mod_perl and an SQL database to function - let me know if you want me to explain that one. -- Bernhard van Staveren - madcat(at)ghostfield.com GhostField Internet - http://www.ghostfiel