Sunday, August 2, 2009

Server-- running a forums. Is php(mysql) or cgi(perl) faster?

I'm running a server on an old AMD K-6 500 MHz system w/ 256 megs of ram and a few hard drives, using WinXP Pro... I installed the package XAMPP which includes:


* Apache 2.2.2


* MySQL 5.0.21


* PHP 5.1.4


* phpMyAdmin 2.8.1


* XAMPP Control Panel Version 2.3


* FileZilla FTP Server 0.9.16c


and I was thinking of either installing the perl add-on and using YaBB(Yet Another Bulletin Board) or leaving it and just running phpBB2(php Bulletin Board 2)... Which is faster, Perl or PHP?





Thanks for any input or answers!





~~Greg

Server-- running a forums. Is php(mysql) or cgi(perl) faster?
It depends on configuration. CGI installations are slower than mod_php, mod_perl, and FastCGI installations.
Reply:perl would be faster, but php are more complete and your application would be better.


PERL script dies before it gets the chance to finish?

I built a perl script that takes care of html multipart file uploads. When I press the stop button in firefox, the script continues for a bit, does what it has to do, and stops. But hen I press the stop button in explorer, the script exits immediately. Any ideea why this is happening and how can I solve it / trap the exit?? Many thanks in advance!

PERL script dies before it gets the chance to finish?
It sounds like maybe IE aborts the file upload, possibly meaning that the script never even gets called. Since you have stopped your browser from getting anything from the script, you'll have to have your script write a log of its activities, if any, to a file on the server. And, why are you pressing the stop button?


How do trade my pokemon from my friend.i have diamond ann my friend has perl.?

how can i trade pokemon from perl to diamond in nintendo ds.plz answer this question.

How do trade my pokemon from my friend.i have diamond ann my friend has perl.?
you have to go to the nearest pokemon center (or anyone you want and you and your friend dont have to be in the same center) then go upstair and go to the nurse infront of the first door and then you talk to her and you will go inside the room then you wait for your friend and then talk to your friend and you can choose trade. So there you go!!! this advice only works if you and your friend are in the same room or place! (no wifi)
Reply:two ways. one: if your at your house and your friend is at his house, both of yous get on your computer and do a wi-fi conection and both of you first have to add each others Friend Codes to your Pal Pad Key Item, and then go to Jublife City to the WFC at its south left of the city. Then Trade





Two: both of you are sitting close, both of you go into any PC and go up and wiresly trade your pokemon.
Reply:well for the easiest way isto go to his house go to a poke centre trade and u will find him,this is the one without wi fi

wedding song

For writing PHP / Perl, is there any way to assign any of the keyboard keys to output '$' sign without shift?

Quite tiring to press the shift key to write dollar sign. Where PHP and perl codes use $ everywhere.

For writing PHP / Perl, is there any way to assign any of the keyboard keys to output '$' sign without shift?
Map your keys :)





Read this article


http://www.pitt.edu/~kconover/keithbet.h...





Here is TradeKeys


http://www.pcmag.com/article2/0,1759,156...


Help with system command in perl on windows?

If i click Start --%26gt; Run ---%26gt; put in c:\control\x10com32.exe a2 off then click OK, the command executes succesfully.





How would I run this command in a cgi/perl script? I've tried


system ("c:\control\x10com32.exe a2 off"); but nothing happens. Could it be something in a perl configuration that prevents me from launching executables?

Help with system command in perl on windows?
Well, you didn't say which web server you use - IIS or Apache, and which Perl - ActivePerl or Cygwin Perl.


That highly influences possible answer.





First off, replace backslashes by forward slashes - you're feeding the wrong command to it:





system("c:/control/....");





Second, check the exit status right after using this code taken from Perl man page for system().





if ($? == -1) {


print "failed to execute: $!\n";


}elsif ($? %26amp; 127) {


printf "child died with signal %d, %s coredump\n",


($? %26amp; 127), ($? %26amp; 128) ? 'with' : 'without';


} else {


printf "child exited with value %d\n", $? %26gt;%26gt; 8;


}





Check your web server's error log file - it may shed some light on the problem.





Another thing is, if your program x10com32.exe uses GUI, it simply won't work. GUI programs don't work from most Windows-based web servers, because web server runs as Windows service (before any desktop session exists) and Windows prevents services from interacting with desktop. You are limited to command-line programs in that environment.





Replace your command by something more simple - like system("echo great success %26gt; c:/tmp/test.txt");





If that works, but your program doesn't, the problem is in your program.





Good luck.
Reply:This has to do with "quoting" and "control character sequences" in Perl.





Short answer - do this:


system ("c:\\control\\x10com32.exe a2 off");





Long answer:


Read this:


http://www.shlomifish.org/lecture/Perl/N...


Question About Matt's Script Archive Formmail Perl Script?

I am setting up formmail on my web site. It is pretty straight forward but when I get to the help section about creating the HTML form, it says the only mandatory tag is the one that has my email address in it. I don't get it. I had to enter my email address in the perl script variables. Why would I want to enter it again within my form page and risk having an email bot spider it and styart getting spammed? Am I not understanding it correctly?

Question About Matt's Script Archive Formmail Perl Script?
change the function that checks for required fields.





in the check_required function delete any references to email.





Make sure that you do not reference any variable to send the email to. hard code the destination email address so your server will not be usefull to spammers.





spammers can use formmail to post to websites with whatever fields that they want, specifying any destination email that they want if the web masters does not modify the formmail program.


Where is new moon island in pokemon perl?

moon island is right next to the island you first see cresilla

Where is new moon island in pokemon perl?
There is an event pokemon there, Darkrai, but I think you need to go to a Pokemon D/P Event. Other than that, there is no way to go to "New Moon Island" or get Darkrai, for that matter. Sorry. =(

stamen

How to read the .ser files using perl script ?

I want to pull out the contents from the .ser files. how do I do that using the perl script ? or Can I see the contents using some editor ?

How to read the .ser files using perl script ?
Perl can open and read any file type.


If you want to actually process the data in the file then that may be a problem.


If you want to view the contents of a ser file then you can always open it using Notepad. Once again you may not be able to actually see anything of any use as this is an application file.


Perl Programming, Im trying to write a basic-ish perl program asking for customer details?

I am stuck on doing the 'customer title', how do i specify that a user must insert a certain input. ie. the %26lt;STDIN%26gt; must be Mr, Mrs, Ms, Miss..etc. I have tried putting the titles in an array, but cant call them to match the %26lt;STDIN%26gt;. I no this may seem a bit vague as i am very new to perl but any help would be VERY grateful.


Thanks

Perl Programming, Im trying to write a basic-ish perl program asking for customer details?
maybe a regular expression will help.





while(%26lt;STDIN%26gt;){


print /^(Mr.|Mrs.|Ms.)/ ? 'ok' : 'NOT OK', ' - ';


print $_;


};


How do u get evee in pokemon dimond and perl?

There are two ways to get an Eevee in Diamond and Pearl.





First you must defeat the Elite Four and have your Sinnoh Pokédex upgraded into the National Dex.





After this, if you visit Bebe in Hearthome City, next to the Pokémon Center, she will give you a free Eevee.





Another Eevee may be obtained in the Trophy Garden of Mr. Backlot. Talk to him everyday to see which Pokémon you can catch that day.

How do u get evee in pokemon dimond and perl?
you have to get national dex then go to bebe in hearthome city ; the place where the contest place is for beauty,smartness,etc. check every house to find her if u dont know where she is.keep a spot open in your party and she'll give you an eevee with your ot number.to evolve it into fire electric or water just use fire stone ,thunder stone or water stone.for espeon, umbreon, glaceon and leafeon you have to use dusk stone,sun stone,ice stone and leaf stone.





hope that helpz.





________________________________





my fc is 0668 4009 6903


trainer name is phantom


im on every sat. and sun.
Reply:after you get the National dex ( seen all 150 Pkmn go to Professor in Sandgem town he upgrades you to it) then go see the girl in Heartholm beside the Pokecenter and if you have an empty spot she gives you Evee.


How to write XML on Perl?

Could anyone tell me where I can find information about writing XML (plus DTD and XSLT) on Perl?





Andy.

How to write XML on Perl?
There are modules on CPAN that can make working with XML files much easier for you. Search for XML, and you'll find several, just pick the one that most closely matches your needs. You have been sparse with your requirements so it's hard to know what you're doing to be much more helpful than that.
Reply:as long as you print to standard out you can write xml...





xml is merely a schematic for organizing data, so it all depends on how you format your output





... if you're using this for a server side script... don't waste ur time formating it in proper xml... just make it easy to parse in your client side script
Reply:There's probably something at www.w3schools.com. That's where I get most of my web programming instruction.





You could also "google" it.

sim cards

Multi thread in perl,Scalars leaked is occured?

I'm a network administrator,and must scan my office network every week.I must scan ftp weak password and ssh password and resolve hostname,so do this script.But Scalars leaked is occured.Could you help me?





Code is too long to post here,I will post it as a answer.

Multi thread in perl,Scalars leaked is occured?
faint,I can't answer my own question.this is my friend's ID.





#!/usr/bin/perl -w





use strict;


use threads;


use Net::IP;


use Net::FTP;


use Net::SSH::Perl;





######################################...


# global variable


######################################...





my @users = ( 'root','user','ftp' );


my @pwds = ( '123', '12345', 'ftp', 'root' );





my $if_scan_ftp = 'false';


my $if_scan_ssh = 'false';


my @ip_list;





my $max_thread = 30;


my $current_thread = 0;


my @thread_array;





my $time_out = 3;





######################################...


# sub function


######################################...





sub Usage


{


print "\nTest to scan weak password,code by xingguo 060909\n";


print "Usage: scan_pass.pl %26lt;host%26gt; %26lt;option%26gt;\n";


print "Host :\n";


print " -ip use a ip range,just like -ip startip endip\n";


print " -list load ip list from a file,just like -list hostfile.one ip each line,or startip-endip each line\n";


print "option:\n";


print " -ftp scan ftp password\n";


print " -ssh scan ssh password\n";


}





# check arguments





if( @ARGV %26lt; 3 )


{


Usage( );


exit 0;


}





if( ( ($ARGV[0] ne '-ip') %26amp;%26amp; ($ARGV[0] ne '-list') ) )


{


Usage( );


exit 0;


}





foreach my $arg( @ARGV )


{


if( $arg eq '-ftp' )


{


$if_scan_ftp = 'true';


}





if( $arg eq '-ssh' )


{


$if_scan_ssh = 'true';


}


}





print "Load IP list.....\n";





MakeIPList( );





print "Starting scan.....\n";





foreach my $remote_host( @ip_list )


{


if( $current_thread %26gt; $max_thread )


{


foreach my $thread( @thread_array )


{


$thread -%26gt; join( );


}





$current_thread = 0;


}





$thread_array[$current_thread] = threads -%26gt; new( \%26amp;ScanHost, $remote_host );


$current_thread ++;





print "Now thread is $current_thread\n";


}





sub ScanHost


{


my $remote_host = shift;





if( $if_scan_ftp eq 'true' )


{


foreach my $user ( @users )


{


foreach my $pass( @pwds )


{


my $ftp = Net::FTP -%26gt; new( $remote_host, Timeout =%26gt; $time_out );





if( ! $ftp )


{


return -1;


}


my $flag = $ftp -%26gt; login( $user, $pass );





if( $flag )


{


print "Found ftp account from $remote_host: $user/$pass\n";


}


}


}





print "Scan ftp account from $remote_host done.\n";





return 0;


}


}





sub MakeIPList


{


my $start_ip;


my $end_ip;


my $string_ip;





if( $ARGV[0] eq '-ip' )


{


$start_ip = $ARGV[1];


$end_ip = $ARGV[2];





for( my $index = IntIP($start_ip); $index %26lt;= IntIP($end_ip); $index ++ )


{


$string_ip = StringIP( $index );


push( @ip_list, $string_ip );


}


}


elsif( $ARGV[0] eq '-list' )


{


open( RH, "%26lt;$ARGV[1]" ) || die "Open $ARGV[1] error....\n";





while( my $line = %26lt;RH%26gt; )


{


chomp( $line );





if( $line =~ /^(\d+\.\d+\.\d+\.\d+)-(\d+\.\d+\.\d+\.\... )


{


$start_ip = $1;


$end_ip = $2;





for( my $index = IntIP($start_ip); $index %26lt;= IntIP($end_ip); $index ++ )


{


$string_ip = StringIP( $index );


push( @ip_list, $string_ip );


}


}


elsif( $line =~ /^\d+\.\d+\.\d+\.\d+$/ )


{


push( @ip_list, $line );


}


}


}


}





#sub CheckPort


#{


# my $host = shift;


# my $port = shift;


#


# my $sock = IO::Socket::INET-%26gt;new( PeerAddr =%26gt; $host,


# PeerPort =%26gt; $port,


# Timeout =%26gt; $time_out );


#


# $sock -%26gt; close();


#


# return $sock;


#}





sub IntIP


{


my $ip = new Net::IP( shift );





return $ip -%26gt; intip( );


}





sub StringIP


{


my $in = shift;


my $oct = sprintf("%o",$in);





$in=~ s/^0//;





my %scale=( '0'=%26gt;'000',


'1'=%26gt;'001',


'2'=%26gt;'010',


'3'=%26gt;'011',


'4'=%26gt;'100',


'5'=%26gt;'101',


'6'=%26gt;'110',


'7'=%26gt;'111'


);


my @scale = split( "", $oct );


my $bin = "";





foreach( @scale )


{


$bin .= $scale{$_};


}





if( length($bin) %26lt; 32 )


{


my $less = 32 - length($bin);


my $before = '0' x $less;





$bin = $before.$bin;





goto strip;


}


while( length($bin) %26gt; 32 )


{


my @bin_array = split( "", $bin );





my $index;





my $number = @bin_array;





if( $bin_array[0] == 0 )


{


$bin = "";


for( $index = 1; $index %26lt;= $number; $index ++ )


{


$bin = $bin.$bin_array[$index];


}


}


else


{


last;


}


}


goto strip;





strip:





my $bin_ip1 = substr( $bin, 0, 8 );


my $bin_ip2 = substr( $bin, 8, 8 );


my $bin_ip3 = substr( $bin, 16, 8 );


my $bin_ip4 = substr( $bin, 24, 8 );





my $string_ip = b2d( $bin_ip1 ).".".b2d( $bin_ip2 ).".".b2d( $bin_ip3 ).".".b2d( $bin_ip4 );





return $string_ip;


}





sub b2o{


my $in=shift;


my %scale=( '000'=%26gt;'0',


'001'=%26gt;'1',


'010'=%26gt;'2',


'011'=%26gt;'3',


'100'=%26gt;'4',


'101'=%26gt;'5',


'110'=%26gt;'6',


'111'=%26gt;'7'


);





my $out="";


my $tmp="";


my $exitFlag=0;


while(!$exitFlag){


$tmp=substr($in,-3,3);


if(length($tmp)%26lt;2){


$tmp='00'.$tmp;


$exitFlag=1;


}


elsif(length($tmp)%26lt;3){


$tmp='0'.$tmp;


$exitFlag=1;


}


$out=$scale{$tmp}.$out;


$in=substr($in,0,-3);


}


$out;


}





sub o2d{


my $in=shift;


$in=~ s/^0//;$in=~s/^(\d)/0$1/;


my $out;


eval "\$out=sprintf(\"%d\",$in);";


$out;


}





sub b2d{


my $in=shift;


my $out=o2d(b2o($in));


}


Where is new moon island in pokemon perl?

it is east of fullmoon island. It is where darkrai is. you can only get there with an action replay or wait for a pokemon event to come out. when it does you can go to the event download the members card. then go to a pokemart. go inside. there should be a man in a green hat. talk to him and he will give you a members card. then go to canalave city at night[about 9 ocklock] go to the locked inn and you should be able to go inside. a guy will put you to sleep right away. you will wake up on fullmoon island. you can go catch darkrai. after you catch him you will wake up. go outside the inn and a sailor will talk to you. you can now go to new moon island on the boat.

Where is new moon island in pokemon perl?
its on the upper left corner of sinnoh(map) beside fullmoon island where u get cresselia


Does anyone know how to make a Perl program that generates a check.?

The program ask the user for the information below. The user data is assined to the scalar and array variables.





Check Number ($chkno)


First Name ($first)


Last Name ($last)


A two line Address, stored in array (@addr)


Phone Number ($phone)


Date ($date)


Payee ($payee)


Check Amount ($amount)


Check Purpose ($memo)





In the format below.


+-------------------------------------...


|........................................ No....$chkno...|


|..$first......................$last..... |


|..$addr[0],,(Space to +)|


|..$addr[1]..(Space to +)|


|..$phone..(space to line aligns)..$date....|


|..(space to +)..|


| Pay to the..(space to +)..|


| Order of:.....................$payee............. $amount |


|..(space to +)..|


| For: $memo........................ Stamped Signature |


| (space to +) |


+-------------------------------------...

Does anyone know how to make a Perl program that generates a check.?
Why would you want to do this? Doing a form in perl sounds like lots of time. It has to be lined up and checked. Its just like "c". Use a printf statement.





Good luck


How do you check to see if a string is NULL in PERL? ie in C... if (string) { //string exists }?

In perl, it's pretty much the same:


if ($string) {


#$string exists


}





if (!$string){


#$string is NULL


}

How do you check to see if a string is NULL in PERL? ie in C... if (string) { //string exists }?
if($str1 eq "") {.....} #check to see if string str1 is null
Reply:still interested in doin that semi-volunteer work for my site?





email me: X_9th.Gate_X@yahoo.com

garden ridge

Need a perl/awk/shell script which will look for duplicates in /etc/hosts file?

Need a perl/awk/shell script which will look for duplicates in /etc/hosts file. the file file format is %26lt;IP%26gt;TAB%26lt;Hostname%26gt;TAB%26lt;Description%26gt;. The script will look for duplicate IP or hostname and once it is found, it will send e-mail to few users, also the scrip needs to be run using cron job at midnight. Thanks

Need a perl/awk/shell script which will look for duplicates in /etc/hosts file?
Are you allowed to be on the internet at work?


Trying to upload this guest book to my web page cgi perl script?

Bareword found where operator expected at guestbook.cgi line 1, near "/nf/lib" (Missing operator before lib?) Unquoted string "lib" may clash with future reserved word at guestbook.cgi line 1. syntax error at guestbook.cgi line 1, near "/usr/local" BEGIN not safe after errors--compilation aborted at guestbook.cgi line 8. could not fire up guestbook.cgi





The error message I am getting ? what am I doing wrong thanks

Trying to upload this guest book to my web page cgi perl script?
hi there,





I understand your trying, unless I see your full code then I can give you the solution, anyway I have suggestion you can use other web programming language like ASP, PHP you can free one at the following links:





1. http://www.1phpstreet.com


2.http://www.1aspstreet.com





Cheer


Where can I get a perl compiler?

in all Linux cd's

Where can I get a perl compiler?
(m)





The Perl compiler is not just for compiling Perl code to a standalone executable - in fact, some would argue that it's not at all for compiling Perl into a standalone executable. We've already seen the use of the B::Terse and B::Tree modules to help us visualise the Perl op tree, and this should give us a hint as to what the Perl compiler is actually all about.





The compiler comes in three parts: a frontend module, O, which does little other than turn on Perl's -c (compile only, do not run) flag, and loads up a backend module, such as B::Terse which performs a specific compiler task, and the B module which acts as a low-level driver.





The B, at the heart of the compiler, is a stunningly simple XS module which makes Perl's internal object-like structures - SVs, ops, and so on - into real Perl-space objects. This provides us with a degree of introspection: we can, for instance, write a backend module which traverses the op tree of a compiled program and dump out its state to a file. (This is exactly what the B::Bytecode module does.)





It's important to know what the Perl compiler is not. It's not something which will magically make your code go faster, or take up less space, or be more reliable. The backends which generate standalone code generally do exactly the opposite. All the compiler is, essentially, is a way of getting access to the op tree and doing something potentially interesting with it. Let's now take a look at some of the interesting things that can be done with it.





mywebpages.comcast.net/virban/fht/tool...





here u get the perl compiler

flowers for algernon

I need help installing PF1, a point and figure charting application written in Perl. Can anyone help me ?

Pf1 is a point and figure charting application written in Perl. PF1 is free and is licensed under the GNU General Public License (GPL). The application is available at web site link: http://www.xmlworks.com/pf1/


I have downloaded the application, installed Perl, and run the application as follows from the C:\Perl%26gt; prompt: C:\Perl%26gt;perl pf1 and I get the following line: Can't open perl script "pf1": Permission denied and a newline with the prompt C:\Perl%26gt;. Please if anyone is able to help with this I would really appreciate it. I am available on yahoo IM if you are able to set it up and walk me through it. Thanks alot.

I need help installing PF1, a point and figure charting application written in Perl. Can anyone help me ?
Look for a specifc forum and people can help. good luck


How to install PERL dbi in Windows xp?

I have Perl 5.6.1 installed and Mysql 5.1. I would like to connect Mysql via Perl DBI.

How to install PERL dbi in Windows xp?
Follow these instructions.
Reply:There's another resource to check-out that covers a lot on the DBI module. http://perltricks.net/perl_dbi... Report It



How do I create a database in memory using perl?

Go to Help and Support menu %26amp; clicl memory using %26amp; perl

How do I create a database in memory using perl?
Pls elaborate more.....dont know what is perl?
Reply:Elizabeth, I do not know what perl is.


If you know basic HTML, is it difficult and/or time consuming to learn Perl, CGI, php or asp?

Are they vastly different or do they build on HTML principles?

If you know basic HTML, is it difficult and/or time consuming to learn Perl, CGI, php or asp?
To directly answer your question, yes it may be somewhat difficult if html is the only "programming" you know. I put the quotes b/c it in no way is actual programming...





Anyways, nothing is too hard if you put your mind to it right? But perl, php are certainly much more complicated than html is. These require more logic, coming up with algorithms, etc...





They do not build on html principles. In fact, php would be more closely related to a language such as 'C' than anything (although C is more complex and powerful). But as the post above me mentioned, most people do use php within html for web development. But that's as far as the similarities go
Reply:HTML is not actually programming and HTML is very very simple and can be learn't in a few hours. Programming can take days to (months to) learn and it is not a simple transition. Of those that you mentioned, PHP is the easiest to learn. Good luck!
Reply:HTML stands for Hyper-Text Markup Language. A markup language only specifies the layout of text and images on a page. Perl, CGI, PHP and ASP are programming or scripting languages for webservers, contrary to HTML which is for web browsers. So there are no similar principles, but you use the two in combination. For example:


%26lt;html%26gt;%26lt;head%26gt;%26lt;title%26gt;%26lt;?php print($title); ?%26gt;%26lt;/title%26gt;%26lt;/html%26gt;


There are some great tutorials at http://www.w3schools.com/ that I heartily recommend you to look at. Good luck! :-)

business cards

How to use Inline in perl script?

Hi I am trying to use Inline in perl to embed Java code in the script.


I am getting the following error .


Can't locate auto/Inline/autosplit.ix in @INC (@INC contains: C:/Perl/site/lib C


:/Perl/lib .) at C:/Perl/lib/AutoLoader.pm line 160.


at C:/Perl/lib/Inline.pm line 7


Can't locate auto/Inline/denter/autosplit.ix in @INC (@INC contains: C:/Perl/sit


e/lib C:/Perl/lib .) at C:/Perl/lib/AutoLoader.pm line 160.


at C:/Perl/lib/Inline/denter.pm line 5


Can't locate Inline\Java\default_j2sdk.pl in @INC (@INC contains: C:/Perl/site/l


ib C:/Perl/lib .) at C:/Perl/lib/Inline/Java.pm line 40.


Compilation failed in require.


BEGIN failed--compilation aborted.











Can someone help me with this

How to use Inline in perl script?
I do a lot of perl but never used inline. It looks as though you do not have the modules installed on your computer. If it is on your computer but not under the standard library directory, at the beginning of your program:





BEGIN { unshift(@INC, 'path-to-the-module'); }


Is it possible to write perl script in dotnet framework?

IS IT POSSIBLE TO WRITE PERL SCRIPTS IN DOTNET FRAMEWORK SUCH AS ASP.NET

Is it possible to write perl script in dotnet framework?
It is possible using the new (relatively) development version of Perl 6 and the Parrot virtual machine.


http://www.parrotcode.org/





Though it may not be fully complete as it is under active development, there is hope that someday you can write code in different languages and run them seamlessly.

birthday cards

How do I find out if my webpage host has PERL installed?

I already contacted the web admin, no reply yet.





superb.net





WHERE DO I LINK MY PERL DOC TO??

How do I find out if my webpage host has PERL installed?
I many cases, if you have a cgi-bin folder on your webserver, you will have the PERL library installed on your server.





You can always try running a PERL script, that will tell you :)





PERL is normally installed @ /usr/bin/perl
Reply:do you have shell access on the host? if you do, then run "which perl". It will tell you if perl is installed and where.





Also, it's perl and not PERL because perl isn't really an acronym. See http://perldoc.perl.org/perlfaq1.html#Wh...


or run "perldoc -q difference.*perl.*Perl" for why this is so.


For perl this is pretty what does "lt" mean? I have it described better in the question?

For x =7


y= 34





If x%26gt;y print A


else print B


If x lt y print C


else print D





What is the output, what does lt mean?

For perl this is pretty what does "lt" mean? I have it described better in the question?
"lt" means a STRING less-than, so in your example the STRING "34" alphabetically comes before the STRING "7". RTFM
Reply:BC








If means before Christ


Is thr a site to download perl/ruby/python scripts?

I am looking for a site where a user can download a script to do some mundane task. It could be in any language and it could of any size.

Is thr a site to download perl/ruby/python scripts?
There is a public library for Perl - http://www.cpan.org - which is CPAN -the Comprehensive Perl Archive Network





For Ruby, try http://www.rubycentral.com





I can't see anything clearly relevant for Python.


Is it possible to hide a perl script in a jpg?

No, you cannot hide a perl script in a jpg.

Is it possible to hide a perl script in a jpg?
You can put the words in the meta tags. You can tack stuff on in a RAR file at the end. But you cannot modify the JPEG so that it executes a program.
Reply:It's possible to hide anything in a digital image.
Reply:You aren't trying to make a virus, are you?

sepal

How to read a .doc file in perl on linux machines. On windows we do that ny using OLEs. Help me out on linux.?

How to read a .doc file in perl on linux machines.





On windows we do that ny using OLEs.





Help me out on linux.





Thanx a lot,





Anil. R

How to read a .doc file in perl on linux machines. On windows we do that ny using OLEs. Help me out on linux.?
Home or work network





If work get them to install WINDOWS APPLICATION SERVER





That way you can read most PC based formats.





At home, just download a reader


Can the output of a PERL printF statement be directed to a string?

i.e. formatted printing to a string rather than a file or screen

Can the output of a PERL printF statement be directed to a string?
Yes but it is not the same function to do it, STDOUT is best not to be messed with, so look for the function that let you pass an output pointer (string, not handle) as its first argument. I usually confuse the stuff in Perl and C, but I think it is sprintf()





If you just want a wholesale redirection of the entire program output pipe it in eval().


I want to learn Perl. Is Larry Wall's famous Programming Perl still OK to use if 2nd edition?

A third edition is available to buy, but second edition is available at library for free. Is it worth buying 3rd edition?

I want to learn Perl. Is Larry Wall's famous Programming Perl still OK to use if 2nd edition?
The 3rd edition came out in July of 2000 so that means the 2nd edition is fairly old. You can see all the updates that have occurred since then at the Perl site.





http://perldoc.perl.org/perlhist.html





A lot of it is still relavent with the latest release, however, just be aware that some of it may be somewhat outdated or deprecated. For the list of changes, you can go here.





http://perldoc.perl.org/index-history.ht...





Most of the updates were fixes for bugs and/or cosmetic changes so you could get by using the 2nd edition. Just skim over each of the updates posted in the 2nd link to watch out for any major caveats.





Personally, I would go out and buy the 3rd edition if I didn't already have it. It's handy enough to keep nearby.


What is the best Perl programming book?

I’d recommend reading both Learning Perl [1] and Intermediate Perl [2].





The first will teach you the fundamentals to the point that everything else you need you can learn from reading documentation and articles on the Internet.





If, like me, you find it easier learning from a physical book, Intermediate Perl will give you everything you need to work with objects, modules and complex data structures.





There is another book in the series, the recently published Mastering Perl [3]. I’d certainly recommend reading this book, but I’d leave it a while as it will be most useful when you’ve built up some experience.





There are other books that are useful after you’ve read the first two - The Perl Cookbook [4] gives specific examples of how to solve many problems you’ll come across, and Perl Best Practices [5] will make your programs cleaner and easier to maintain.








Best wishes,


Dave Cardwell.


http://davecardwell.co.uk/perl/








P.S. No, I don’t work for O’Reilly :P

printable cards

Does anybody know the perl programming language?

I know Perl. There are a huge number of sites on the Internet at which you can access tutorials, reference, discussions and sample code focused on Perl. There'd be almost no need for you to ask such a general question on this site if you'd avail yourself of these resources, IMHO.





A few sites are listed under "Sources".





Making use of Yahoo!s Web search facilities to sharpen the focus of whatever your need for Perl information is would save you time.

Does anybody know the perl programming language?
In addition to the web sites named above, there are any number of good books. You can probably find 1 or more at your local library. The advantage of the books and web sites over Yahoo!Answers is that you don't have to decide if the answers you get there are correct.


Which computer languages are going to be used a lot in Future and will Perl be relevant in the future?

Having 25 years in IT I can tell you that whatever languages will be used most won't be what you think they will be. Corporate lobbying by consulting firms influence the decisions of what languages to use far more than actual functionality or feasibility. Corporate consulting makes their money by continually making what is working best obsolete in the minds of the bureaucracies who make the high level decisions. Those of you who know what really makes sense simply do not have a voice. You can't afford to wine and dine the corporate executives.

Which computer languages are going to be used a lot in Future and will Perl be relevant in the future?
In my humble opinion, computer programming is moving from OS dependent into multi platforms. So, I think Java and web based programming have good future. If you decide to use web based programming, I think PHP has better chance, rather than others (ASP, Perl, etc). Report It

Reply:bin. number , of course ..


and maybe
Reply:please clerify your questio ,cause in programming you can say JAVA is developing more and more but C++ is also having object oriented orgramming features so no language can beat it,but it depends upon requirements of project.


If u r talking about database then it is all different cause oracle database is biggest and having almost all features and full support,but it is costly....you please clerify your search which field you wanna ask so that i can write in detail.


Having little difficulty teaching myself Perl. Can someone help me? Any suggestions?

I have installed ActiveState Perl to my Windows XP computer but am not used to using the command line interface. Can someone help me either online tutor and/or really easy instructions to follow by email?. Any guidance appreciated. Thanks

Having little difficulty teaching myself Perl. Can someone help me? Any suggestions?
Diamonds are shinyer
Reply:dude just forget it
Reply:Good on you for attempting to learn Perl.





Once you have the basics under your belt, you'll be


amazed how easy it is to learn, write, and execute


Perl scripts. It is even possible to create executable


files from your scripts.





The Perl distribution ( see first link ) comes with a


massive amount of documentation, that includes crib


sheets, script examples, demonstration programs,


and a basic tutorial guide, called PerlTut.





ActiveState have this Core Documentation available


on-line ( see second link ), along with details specific


to the running of their version of Perl under the


Windows operating system.





Make sure you read the following especially,





perlintro


perltoc


perlreftut


perldsc





It can be a steep learning curve sometimes, but all the


information you'll maybe ever need to know is there.


Give it a try, ok?





Good luck!





C


What are the best refference books for PERL(practical extraction and reporting Language)?

It all depends on your level of Perl programming. The O'Reilly books are good, but their "Learning Perl" book is pitiful. It's way to advanced for someone who doesn't understand programming or have never seen Perl. The Intermediate book and Advanced book are pretty good though. I also highly recommend the Perl Best Practices book (again O'Reilly) This book shows you the most accepted way to skin a cat (as in Perl there a zillion ways to do things, this book says which one is BEST). Also I have SAMS, How to teach yourself Perl in 21 day book. While impossible to do in 21 days, it's a great reference becuase it really breaks things down into easy to understand pieces. I would stay away from Perl By Example (Quigley). Also the best bet is to get all these books at once and get a Safari Online book subscrption. Link listed below:

What are the best refference books for PERL(practical extraction and reporting Language)?
Oreilly has a very good book. More than that, there is tonnes of material including on perl including free online books/ebooks and examples. Just google for it.
Reply:Oreilly's Camel book is good one for beginners and Cookbook if good one if you know basics of perl.


and you can get some online documents in www.perl.org and www.perl.com.

love song lyrics

What does /^\s*\.*?\s+\.*?\s+(.*?)\s+.*\... means in Perl Programming?

Can anyone kindly explain to me what does the following expression mean in PERL programming?





If (/^\s*\.*?\s+\.*?\s+(.*?)\s+.*\s*$/) {


print “$1\n”;


}

What does /^\s*\.*?\s+\.*?\s+(.*?)\s+.*\... means in Perl Programming?
It looks to me that it is PERL form of the HTML bold.
Reply:I don't know perl but I do know that what is being tested is a regular expresion. However it doesn't seem that the regular expression is being used, it looks like it's just being declared.





The regular expresion would match something like " .... ..... foo bar ", $1 would refer to "foo" in this case.
Reply:This is a regular expression - since it seems to be cut in the submission I cant fully understand it but - refer here


http://www.perl.com/doc/manual/html/pod/...
Reply:^ = beginning of line


\s* = zero or more whitespace characters (as many as possible)


\.*? = zero or more periods (as few as possible)


\s+ = 1 or more whitespace characters


\.*? = zero or more periods (as few as possible)


\s+ = 1 or more whitespace characters


(.*?) = zero or more of any character (as few as possible) (save this in $1)


\s+ = 1 or more whitespace characters


.* = zero or more of any character (as many as possible)


\s* = zero or more whitespace characters (as many as possible)


$ = end of line


How to convert character space into a hyphen in perl?

I have a perl script that generates static html pages based on company name. However, it is written in such a way that the html pages are created with spaces in them ( because company name will have space).





Is there anyway I can convert spaces into Hyphens?.

How to convert character space into a hyphen in perl?
Kolmogorov is right, but here's how it would apply to your code:





my $title_no_spaces = $rec{'Title'} =~ s/ /-/g;





my $_file = $title_no_spaces."-".$id.$build_e...
Reply:this is a script that will convert all the spaces in the file called a.txt into hyphens and store the result in the file a2.txt





if by $_file you mean it is the file name then replace a.txt with $_file





open (FILE, "a.txt");


open OUTPUT, "%26gt;a2.txt"


my @lines = %26lt;FILE%26gt;;


foreach(@lines){


s/\ /-/g;


print OUTPUT "$_ \n";


}
Reply:I don't know Perl per se, but the generalised method would be to parse the string char by char, replacing all occurences of " " with "-". It shouldn't be any more complicated than a short for-loop.


My pokemon beloum is on lv 20 but not evolve in pokemon perl?

not evolve

My pokemon beloum is on lv 20 but not evolve in pokemon perl?
maybe it was caught at that level, maybe it was holding an everstone, maybe you accidently pressed "b"? if you got it as a trade then possibly the trader had done any of those things. if it wasnt traded then YOU must've done one of these things
Reply:level it up once, if it holding an ever stone it wont evolve
Reply:level it 2 lv 30


When does beloum evolve in pokemon perl?

when does he a evolve

When does beloum evolve in pokemon perl?
Metang - Level 20


Metagross - Level 45





Just type the name of the pokemon you want into here if that wasn't the pokemon you wanted to know about -


http://pokemon.marriland.com/diamond_pea...
Reply:wheny ou train it up to a cetain level

greeting cards

How do you dump out a Perl module's runtime dependencies?

... preferably in one liner ...

How do you dump out a Perl module's runtime dependencies?
grep "require\|use" %26lt; themod.pm





but you can dynamically play games that could be missed!





anything better wouldn't be a 1 liner!


Exit a Perl Loop with a Keystroke?

Hi.





I'd like a perl loop that prints out numbers (1, 2, 3, 4...) until the "s" key is pressed. Then it should stop until "s" is pressed again. Then it should start counting where it left off. I think this would be a while loop, but I don't know how to test for a keystroke in the middle of a loop. Can anyone please let me know how to test for a keystroke while counting?





Thanks.


Steve.

Exit a Perl Loop with a Keystroke?
Try this procedure:





http://mirrors.dotsrc.org/cpan/scripts/i...
Reply:Try the Term::ReadKey module.
Reply:Can you use a "do until" loop?





http://perl.about.com/od/perltutorials/a...





More info in this thread-


http://www.thescripts.com/forum/thread49...





Joyce


http://www.DesignByJoyce.com/


HELP! Using Perl in Windows? How do I open the POD?

How do I open the pod to enter things into?? I want to enter





#! /usr/local/bin/perl -w





$sweet = "chocolate";


$presents = 12;


print "I like $sweet\n";


print "How many? $presents\n";

HELP! Using Perl in Windows? How do I open the POD?
I've no idea what a pod is.





1) Start notepad.


2) Copy and paste the above into notepad.


3) Comment out the top line.


4) Save it e.g. as wtfdoespodmean.pl


5) Start a command window and type 'perl wftdoespodmean.pl'.
Reply:http://www.perl.org/books/beginning-perl...
Reply:knit one stroke on pearl one
Reply:You have entered the path of the Perl interpreter as:-





#! /usr/local/bin/perl -w





which looks like the path of a Linux/Unix OS.





Check that the path exists on Windows, if not then change the path or it will not work.


Perl Regex: remove leading zeroes in a string?

I want to rename some files using the rename utility.





I've tried 's/(\d*0)(\d*)/#$2/i' which does the following:


file name 01.ext -%26gt; file name #1.ext





but, it doesn't work when there is no leading zero:


file name 10.ext -%26gt; file name #.ext





Any suggestions?

Perl Regex: remove leading zeroes in a string?
Use the following regex instead:





s/(0*(\d+))/#$2/i





It will swallow entire number and will strip out leading zeroes, if any.
Reply:You need to use the special regex character \A which means "the beginning of the string". So try this:





$sFname =~ s/\A0+//gx;

flower arranging

Wants the strongest attack in Pokemon diamond/Perl?

I THINK THE STRONGEST ATTACK IS HYPER BEAM

Wants the strongest attack in Pokemon diamond/Perl?
up up down down select triangle start.
Reply:I think the strongest attack is roar of time.
Reply:explosion- 250 base damage
Reply:explosion is defianitly the best move out there the only bad thing is that it kills you


if you have good luck try fissure, sheercold, ect...


hope this helped


from another pokemon fan yours truely YUKI


i'm blasting off again(just kidding)


How to searh all .txt files under the specified path using Perl.?

I wanna to searh all .txt files under the path I specified(including sub folder).

How to searh all .txt files under the specified path using Perl.?
use File::Find;