Re: [PBML] Possibly off topic question
- From: "Luinrandir Hernsen" <Luinrandir@...>
> What is PHP and how does it relate to perl?PHP is just another programming language.
> Is PHP a server side or client side code?Server side. PHP is usualy (if not always) included inside HTML
somewhat like this
<title>Now it's <%= localtime %></title>
(I said somewhat. I'm not sure what delimiters does PHP use and
whether it does have a localtime() function.)
> I was told by another party to use scanf, printf and fseekprintf does exist in Perl, instead of fseek() we have just seek(),
> in perl.... but rom my preliminary research, they seem to be PHP
there is no scanf() in Perl. (Except maybe defined in a module. I
never felt the need to look for it.)
> I'm all the heck corn-fused!?
> Oh.. and how am I curently save stuff to file?You can either use print() or printf(). You have to open the file
open my $FH, '>', $filename
or die "Can't write to $filename: $!\n";
This creates a new lexical filehandle $FH and opens the $filename for
writing. If the opening fails the script will print a message and
Then you can print into the filehandle
print $FH "Hello, this goes into the file.\n";
my $code = 7;
printf $FH "The code is %04d.\n", $code;
And when done with the file you just close it:
Anyway I think you'd better get yourself a decent book. Learning Perl
5 is supposed to be a good one.
===== Jenda@... === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery