> 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));
-
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]
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
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()
> 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
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
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
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
> 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
> 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";
>
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
> 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
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:/
> 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
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
15 matches
Mail list logo