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;


Friday, July 31, 2009

Does anyone know of any perl modules that can be used to read a Yahoo! Calendar?

The LWP module collection could do it. However, this would still involve a lot of work. (The modules let you easily process http requests. Since the yahoo alendar is web based, you could use it to make connections and read and parse the results. It would be functional, but a lot of work.)





WWW::Mechanize could further automate the extraction of information.





Neither of these are outlook specific solutions. Though, they would be fairly easy to implement.





You may also be able to look at some of the outlook export formats. Though you would still need a module to process the export and read it. (CSV may be the easiest)


I dont know how to extract the lines from a file using perl commands?

for example if there are hundred lines in a file.if the first pattern which is to be matched is in one line another pattern is in another line .how i have to extract those lines present in the file using PERL COMMANDS.


example program:


0000000 nul ack nul stx nul etx nul fs soh stx nulj nul stx


0000020 nul stx nul so nul ack nul j nul stx nul can nul s


0000040 nul ack nul dc2 stx ack o u t p u t File


0000060 . g d s nul dc4 etx enq %26gt; A ht F '


0000100 9 D 8 / sp esc Z T nul fs enq stx nul


0000120 nul can nul stx nul so nul ack nul j nul stx nul


0000140 nul so nul ack nul dle ack ack t ox c o n t _


0000160 C O N T nul eot bs nul nul ack cr stx nul


0000200 so stx nul y nul , dle etx nul nul nul nul nul


0000220 nul nul vt 8 nul nul nul nul nul nul vt 8 nul 0


i want to extract the lines in the line number 0000140 from ack ack to line number 0000160 (nul eot) .similarly thuout the file

I dont know how to extract the lines from a file using perl commands?
The easiest way to do this is to count back from the end of the array.





For instance, if an array has three values,


$item[0], $item[1] and $item[2] then you can access the last with:


$item[-1]... an easy way to reach it!

flower arrangement

Another perl question- file listing to html?

I have a tab delimited file listing which included file attributes and some other data. The first field will be the file name. I would like to find a perl script that would convert the first field to an html link to the actual file. I would like to convert the file listing into an excel spreadsheet or html page so the user can look at the listing and the attributes and just click on the file he /she is interested in. I would keep the files and the file listing in the same folder. This is in windows by the way.

Another perl question- file listing to html?
use strict; use warnings;


use CGI qw(:standard);


print start_html;


open(FILE,'%26lt;','filename') or die;


my $sRows = '';


while (my $s = %26lt;FILE%26gt;)


{


my @as = split(/\t/, $s);


$as[0] = a({href=%26gt;


"http://server.com/dir/$as[0]"}, $as[0]);


$sRow .= Tr(td(\@as));


} # while


print table($sRows);


print end_html;


Where can i find a working emulator of pokemon diamon/perl version in the ds?

buy 1 @ walmart.

Where can i find a working emulator of pokemon diamon/perl version in the ds?
www.coolroms.com


Would Perl or Python fit what I want?

I used to be a visual basic programmer but since I moved to Linux, I want something that would fit my needs, but Im not sure whether to pick Perl or Python (My narrowed choices)





I want a visual programming environment and a simple syntax like Visual Basic. Would Perl or Python be better for me?





(If Perl nor Python don't have these at all, what would be other alternatives?)

Would Perl or Python fit what I want?
PERL is a scripting language. It doesn't have a GUI. Therefore, if you intend to create forms-based programs, no, PERL is not an attractive option. PERL also does not have what I would call a "simple syntax."





Python is basically in the same boat.





I would suggest Java or Borland C++.
Reply:Perl is not spelled in all-capitals. It has several GUI libraries, including Tk, wxPerl, and Tkx. ActiveState makes a full-featured IDE for Perl, called Komodo. Perl is an attractive option for ALL programming projects. Perl has a "simple C-like syntax" that is easy to learn, yet powerful enough to do anything you can think of.


I don't know anything about Python.


How to open a file in txt/html/xml format using a perl program?

I am trying to write a program using perl which will display the contents of a file in the same format as it is(i dont want to read the contents of the file on the command prompt)....and then ill search for the particular string in it but thats next part...first i want to

How to open a file in txt/html/xml format using a perl program?
Please correct me if i am wrong in understanding your plroblem, is it that you want to view contents of text file in notepad and xml or html in IE, or you just simply want to read the data?





For the former soultion is like..





@Filenames = @ARGV;


foreach (@Filenames) {


$file = $_;


if ( $file =~ /.+\.txt$/i ) {


print "text file";


system("notepad $file");


if ( $file =~ /.+\.xml$/i ) {


print "xml file";


system("iexplore $file");





}





For opening txt file you can use open FH, $filname;(read mode)


for reading XML files you can use


use XML::Simple;





}
Reply:Take a read at these tutorials:





http://www.pageresource.com/cgirec/ptut1...


http://builder.com.com/5100-6372-5314579...


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

eurovision song contest

I'm creating a ecommerce using Perl, Mason Site Builder. My layout uses dotted lines. In IE, these lines are..

I'm creating a site using Perl, Mason Site Builder. My layout has a lot of dotted lines. While the dotted lines work well and are seen perfectly in Firefox as they are, in IE they completely suck. In IE, the lines sometimes are blurry, invisible, and in some parts they stick together like lines. I've checked my codes. I've checked everything. Everything is perfect on my end, it must be a browser issue (damn billy gates!) Anyone can help me? PLEASE?

I'm creating a ecommerce using Perl, Mason Site Builder. My layout uses dotted lines. In IE, these lines are..
Could you post your question 1 more time please? I didn't catch it the first 4 times....


Send me locations of online info on perl programming language?

How about perldoc?


http://perldoc.perl.org/





Alternatively, if you want an unbiased overview, Wikipedia is a good source


http://www.wikipedia.org/wiki/Perl

Send me locations of online info on perl programming language?
pleac.sf.net





has many good snippets and "recipes".
Reply:http://search.yahoo.com/search?search=PE...
Reply:http://www.perl.org/





Also, check out http://groups.google.com/groups/dir?lnk=...


which should take you to comp.lang.perl.misc .


How do I enable fushing in perl (CGI)??

Hi! I'm working on a script that should flush the output without buffering it, during a file upload. I tried using $|=1, and while that works when there's no file being sent (like when running the script without any argument). My script looks something like this:





print "Content-type: text/html\n\n";





$| = 1;





while ( read ( STDIN, $dummy_var , 4096 ) )


{


print 'output%26lt;br%26gt;';


sleep(1);


}





Your help is greatly apreciated. Many thanks!

How do I enable fushing in perl (CGI)??
that is a simple read write, with a silly delay, and the buffering is turned off.... BUT...





cgi isn't cgi isn't cgi! which server? modperl? fastcgi? weird config?





UPDATE:





hmm active state... a good port for a great webserver on an problematic O/S!





try something like "for ... print %26lt;img...%26gt; in the loop, with a greater delay... does that work?





perhaps the STDIN did not have more than 4096 chars in it!





my number 1 rule of debuggin'


remove all but the problem and see if the problem goes away!


What does -> mean in the PERL Programming language?

EG


while ($pointer_apps = $sth_apps-%26gt;fetchrow_hashref) {


$APP_NOTE_KEY = $pointer_apps-%26gt;{'APP_NOTE_KEY'};


$APP_NOTE_SERIES = $pointer_apps-%26gt;{'APP_NOTE_SERIES'};


$APP_NOTE_POSITION = $pointer_apps-%26gt;{'APP_NOTE_POSITION'};


$APP_NOTE_NAME = $pointer_apps-%26gt;{'APP_NOTE_NAME'};


$APP_NOTE_FILENAME = $pointer_apps-%26gt;{'APP_NOTE_FILENAME'};


$APP_NOTE_TYPE = $pointer_apps-%26gt;{'APP_NOTE_TYPE'};


$APP_NOTE_EXT = $pointer_apps-%26gt;{'APP_NOTE_EXT'};


$APP_NOTE_RESTRICTED = $pointer_apps-%26gt;{'APP_NOTE_RESTRICTED'};


#if($APP_NOTE_SERIES eq $app_file){


$app_note_list = $app_note_list . $APP_NOTE_NAME . "^" . $APP_NOTE_FILENAME . "^" . $APP_NOTE_EXT . "^" . $APP_NOTE_SERIES . "^" . $APP_NOTE_POSITION . "^" . $APP_NOTE_TYPE . "^" . $APP_NOTE_RESTRICTED . "^" . $APP_NOTE_KEY . "|";


#}


}

What does -%26gt; mean in the PERL Programming language?
-%26gt; is the in-place dereference operator. It is most commonly used in OOP.





$a-%26gt;{'b'} is exactly the same as $$a{'b'}





-%26gt; can also be used for 'method' calls with blessed objects.


$a-%26gt;function(); is exactly the same as module::function($a);





An 'object' is Perl is actually just a reference to a variable, usually a hash (associative array). As such, whenever you want to use an object, you have to dereference it (othewise perl doesn't know what to do).





See the following in perldoc:


http://perldoc.perl.org/perlop.html - Perl operators


http://perldoc.perl.org/perlref.html - Perl references


http://perldoc.perl.org/perlobj.html - Perl objects


http://perldoc.perl.org/perlmod.html - Perl modules
Reply:It is a push symbol... you are pushin a value in

wedding song

I am new PHP from Perl, How to connect MySql from PHP under linux environment.?

How to get example codes for bigginers in PHP. I am very much interested do learn PHP 5.0 and Mysql 5.0 in linux environment.

I am new PHP from Perl, How to connect MySql from PHP under linux environment.?
%26lt;?php











$db = mysql_connect("localhost", "root");











mysql_select_db("mydb",$db);





You probably DONT want to use root to connect but change that to your username for the database you setup. You probably will also need the password for that user.





That connects you.


If you want a good starting place for tutorials


try.


http://www.webmonkey.com/webmonkey/99/21...


http://www.goodphptutorials.com/category...
Reply:The best place to learn php is from the guys that made the darn thing.





http://www.php.net





look up mysql in the function list





RJ
Reply:The best way is to include a variation of the DB object from PEAR:


require_once "DB.php";


$db = DB::connect("mysql://user:password@host/...





[etc]...
Reply:www.phpfreaks.com , www.mysql.org , Good luck :)
Reply:The syntax of connection from php to MySql database is:


mysql_connect("host name","login","password");


here,


(1) mysql_connect is the name of function


(2)hostname will be localhost if your database and webserver is same else check your host settings for external database server.


(3)login and password is root and blank in default in easyphp, else provide your custom created





eg:


$db = mysql_connect("localhost", "root",""); //connect to database and store the connection point to $db


mysql_select_db("mydb",$db); //select the database name mydb from connection $db





Search in Yahoo/Google for "php beginner tutorials"


Working in perl to creating a tool , when password entered it is visible.how to hide?

The perl tool asks for username and password in console, when the password is entered the user finds the password not hidden,for unix systems that is done by -echo,for windows i need a solution to hide it or mask it with ******** or

Working in perl to creating a tool , when password entered it is visible.how to hide?

Reply:
Reply:| or even blank is ok.


Please help in providing the solution for this.


revert if the query is not clear


Thanks.
Reply:Hello,





use Term::ReadPassword::Win32;


http://search.cpan.org/~ktakata/Term-Rea...





use Term::ReadPassword;


http://search.cpan.org/author/PHOENIX/Te...





Best wishes, Mel


What is the best GUI Perl debugger?

Recently I've moved from programming in J2EE, with it's wide complement of great debugging tools, to Perl. Perl is a great language but I can't find any decent GUI debugger. I've already eliminated the following:





ddd: I can't seem to coax it into building from source


ptkdb: very unstable and development was abandoned in 1999

What is the best GUI Perl debugger?
You can buy a good one from ActiveState, ActiveState Komodo IDE.
Reply:use Eclipse along with the perl plugin. That is too good for debugging


Waht kind of pokemon do you have in pokemon perl or diamond?

My rarest Pokemon in my game is probably either Ho-Oh or Manaphy.

Waht kind of pokemon do you have in pokemon perl or diamond?
I have 445 Pokemon on my dex so far, and my team is=





Lugia, level 100


Charizard, level 88


Luxray, level 99


Golduck, level 76


Azelf, level 85


Giratina, level 86.
Reply:I collect event only pokemon and have all event only pokemon (including my 2 prized untouched leigt shiny deoxys). I also have lots of others as well and a couple of shinys
Reply:i hav all the legendary thats possible to catch. my friend trade me a palkia cause i am playing diamond. will, i dont like to use cheat, so i dont got other legendary pokemons. i hav a shiny gyrados.

stamen

What is the name of module used in perl for Testing?

The Test::Simple [1] suite of modules are the most commonly used for testing in Perl—particularly Test::More [2].





Test::Inline [3] can be handy for stand-alone scripts and testing APIs.





I’d recommend “Perl Testing: A Developer’s Notebook” [4] if you’re really interested in the subject, which can additionally be viewed on-line [5].








Best wishes,


Dave Cardwell.


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

What is the name of module used in perl for Testing?
There are dozens of modules related to testing! The most commonly used is called Test::More. Go to search.cpan.org and search for test::


Is there a perl program that can read outlook file?

Of course! Go to http://search.cpan.org and search for outlook.


What is the full form of PERL? This is the programming lanuguge.?

Practical Extraction and Reporting Language.is a programming language often used for creating CGI programs.

What is the full form of PERL? This is the programming lanuguge.?
Practical Extraction and Reporting Language
Reply:Practical Extraction and Reporting Language


Just started to go through perl tutorial, and can't figure out the solution for this problem, help! Tnks?

A word frequency counter. How often does each word show up in an array of words? Print out a report. (Hint: Use a hash to count of the number of appearances of each word.)

Just started to go through perl tutorial, and can't figure out the solution for this problem, help! Tnks?
Very simple using hash:





@words = ("hello" , "weary" , "dreary" , "weary");


%num = ();





foreach $word(@words) {


$num{$word} ++;


}





foreach $key(keys %num) {


print"$key appears $num{$key} times\n";


}





Explanation:





%num is a hash which maps a word to the number of times it appears in the array.





The number of occurrences is calculated by scanning the array and then incrementing the number mapped to the word.


$num {$word} = 0 by default and since there can only be one mapping per word we get a unique number per word.





The final loop goes through each key of the hash which we have defined as unique words in the array and printing out the number assigned to it.





More detail:





foreach $word(@words) {


$num{$word} ++;


}





First iteration sets $num{'hello'} = 0++ = 1;


Then $num{'weary'} = 1 and then $num{'dreary'} = 1;


Now we find the second instance of weary.


Since we have already defined a hash map of the word weary,


$num{'weary'} ++ = 1 + 1 =2 giving correct number of instances of weary.





foreach $key(keys %num) {


print"$key appears $num{$key} times\n";


}





This loops through each key of %num. We have defined each key as a unique word so $num($key) gives the number mapped to the word which is what we want.
Reply:It seems that you don't know what a hash is. It's a data structure that lets you associate a value with a string. This problem is hinting you to use a hash to associate an integer (the frequency) with a string (a word found in the array). Does that point you in the right direction? (No, I'm not going to give you the answer... 8-)
Reply:Go though the array from the first element and compare it with every other element if it matches than its the same word increment that words count by 1, and also delete the matching word, or put a Null in its place, this is so you dont count it again. Do this for every word in the array.





Im not sure how they want you to use a Hash, I guess you could hash every word in the array and then do the same thing.

sim cards

Are there any really good books or websites for intermediate Perl programmers...?

...which give you some great ideas for speeding up your programs processing efficiency?

Are there any really good books or websites for intermediate Perl programmers...?
I'm an intermediate perl programmer myself, and I've found this website very useful:


http://www.developertutorials.com/tutori...


It gives a lot of tips (and examples) on how to optimize your perl code, and squeeze the most out of it.


If you are interested in learning from books, "OReilly, Mastering Perl" would be a good start. It has a whole chapter dedicated to optimization %26amp; debugging of perl programs. "Perl best practices" (OReilly) is also pretty good.


What things must I code to make a PERL module vs. a basic perl program?

Interesting how many questions on this forum can be easily searched for. This looks like a decent one.


A lightweight code editor for perl?

I've been coding perl in Notepad but I feel that there must be something better. Specifically I'm looking for something that saves easily, has the option of giving the line numbers, not bulky and free. Any suggestions?

A lightweight code editor for perl?
Check out "ConText" it is a simple editor that can be customized for several different languages.
Reply:Check following links:





http://www.perl-express.com/


http://sourceforge.net/projects/open-per...
Reply:Get one from SourceForge.net:





http://sourceforge.net/softwaremap/trove...





Specifically, Open Perl IDE
Reply:It's called a plain text editor. Notepad is a horrible program for plain text.





http://en.wikipedia.org/wiki/Text_editor





Google and Wikipedia will help you find editors. Well known ones (for Windows) are Notepad++, Vim, Emacs (one of the windows versions), UltraEdit (costs money), PSPad, SciTe, and so on.


Not able to open an ssh connection from a perl script(running on windows)?

have apache web server installed on my windows host. running a perl script on this machine and want to open an ssh connection to a remote unix machine and gather some data and output to the browser.


perl version used: 5.6


i am getting all dependcy errors..like some modules not found etc..I installed some modules following the instructions through PPM, but it keeps asking for other modules and I install them and so on so forth...I just dont think I got it right because i believe it wouldn't be this difficult. whether I am getting this error because i am running 5.6(not the latest) or because my perl script is running on a windows machine(rather than on a unix machine), I am not sure.





let me know if u want to take a look at the code snippet...

Not able to open an ssh connection from a perl script(running on windows)?
What kind of data are you collecting? Can this be done with a database connection rather than a perlscript running external programs? It seems like your program will be very inefficient if you have to open a program every time it makes a request for data.
Reply:For a start there is no support for ssh on Windows. You need third party software for this. A good programme is puTTy, which has facilities for setting up port forwarding etc and running the whole thing in auto mode. you could call this from your page.

garden ridge

Can you call an ASP (active server pages) program from a PERL script? If so, how?

I need to execute an asp file from a PERL script. I have very, very little PERL skills (enough to be dangerous). Just want to know if it can be done and what the syntax is.





Thanks.

Can you call an ASP (active server pages) program from a PERL script? If so, how?
The short answer is yes. The long answer is, it depends. There are 2 situations: 1. you have full access to webserver, and 2. you do not.





If you do not have full access you can use one of the many perl modules to access a URL directly and get the generated html and "scrape" what you need from that.





If you have full access, you should be able to execute the command just like any other system command and pipe the out put to a variable.





An example might be:





my $status = system("whatever.asp %26gt; tmpfile")





This would run the asp file whatever.asp and redirect the output to the file tmpfile.





Then you would have to open the file, read it and extract whatever info you wanted.


Anyone want a pokemon diomound and perl wi fi battle in 20 min no legendaries?

my name is nathan but on the game its


name:sassy


fc:3995 4089 9997

Anyone want a pokemon diomound and perl wi fi battle in 20 min no legendaries?
ill battle ive run out of emails for the day so my fc is DAWN 030172235405


Parsing in data into a perl script file from an e-mail filter. How do I grab the data that is piped in?

I am trying to use an e-mail filter in Bluehost. I chose the option to pipe to a program and made a little testfile.pl What I want to do is grab the data from the Subject line, (that I chose as the parameter to filter the e-mails by). So in the testfile.pl, what do I do to get that data so as to manage it? I have for example:





open(IN,"unixcommand|") || die "Could not execute unixcommand\n";


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


command;


}


close IN;





Am I supposed to use this somehow? If so how might I go about it?





Thanks,





Brian

Parsing in data into a perl script file from an e-mail filter. How do I grab the data that is piped in?
What is the full name of the unixcommand file?





You need





open(IN,"%26lt;unixcommand.txt") || die "Could not execute


unixcommand\n";





This gives the full filename (needs full path) and also marks it as read-only by using %26lt;





For relative beginners you should probably start off by reading files this way:





open(IN,"%26lt;unixcommand.txt") || die "Could not execute


unixcommand\n";


while($line = %26lt;IN%26gt;){


chomp($line);


print "This line is : $line\n";


}


close (IN);





So this will go through the file line by line and store it in the variable $line which you can then manage.





If you want to grab data from the subject line, you may need to do a pattern match on the line, but you need to say what each line looks like by giving an example first.
Reply:Brian:


Your example shows us how to read a pipe in perl. Let's change it to a working example and see if that helps:





open(IN,"ps|") or die "Could not execute ps\n";


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


print;


}


close IN;





Assuming you are executing in an environment where you have a path to the ps command you do not need to give a fully qualified path to the ps in open. This perl script opens the ps command and reads its STDOUT storing each line in $_. It then prints $_. This perl script as it stands is the same as typing ps on the command line. Within the while loop, you could, of course, pattern match to identify any particular line, process each line in whatever way you'd like, etc.


So, if your Bluehost account gives you a command to retrieve a mail message, you could use that command in place of the ps command in the example and process it as you wish. You probably want to give the fully qualified path for the Bluehost command though. On my Mac ps lives in /b in/ps if you're using bash or ksh, just type "which command_name" to get the path.


Good Luck
Reply:@stuff = %26lt;IN%26gt;;


that command will slurp all the data in the file into the array @stuff.





foreach $line (@stuff)


{


print $line;


}





or just...


print @stuff





See where the Subject line is in the output. Then do a pattern match to retrieve the subject into a variable.


Does and 1 want a wooper on pokemon diamond or Perl?

If so meet me in the union room any time before 9:00pm my name is jonny

Does and 1 want a wooper on pokemon diamond or Perl?
What?
Reply:Wooper isn't rare.
Reply:no thanks

flowers for algernon

Where can i get a kings rock in pokemon perl?

you can get it from a poliwhirl after you get the national dex through the pick up ability

Where can i get a kings rock in pokemon perl?
I would just migrate a pokemon from firered/leafgreen with a king's rock into your pearl.
Reply:you gotta either equip it to a pokemon that you are going to migrate via Pal Park, and I think theres one on the field or in the underground.
Reply:have you tried your nearest video game store

















flyer5


How do i generate the exe file with active perl?

I have Activeperl version 5.8.8

How do i generate the exe file with active perl?
That's a good question. I've never done this myself. I found reference material from the standard documentation that comes with Perl. Look up perlcc or try the link below.


Perl/CGI, MySQL, Apache how do i make sessions?

Im working on a school computer programming project. Basically what im making is a login page which will then submit it to a perl script which will confirm the login credentials to be true or false - if true i would like to issue a session key which would be recognized through out the website and will allow the user to do different things. So if anyone knows where i can find a good tutorial on this let me know.

Perl/CGI, MySQL, Apache how do i make sessions?
Try the following link.
Reply:You might want to check out the CGI module.


Documentation can be found here: http://www.perldox.com/CGI.html


How do you install Perl?

I try using the Active State package, but whenever I open the .zip package, I can't open the installer.bat file. Am I doing something wrong (I don't want to directly download source coad from perl.com)





Thanks!

How do you install Perl?
apt-get install perl





oh! You mean "How do you install perl ON WINDOWS?" Hmm. Well, try the following:





1) Follow the instructions in the Active State Perl package or from their website





If you can't get that to work, then





2) Install a Linux distro. The all come with Perl.
Reply:@spungoguy: the ported version of perl isn't that bad though,





well, ehm, how do you install perl on Windows, Go to active State, en download the binary instead of the .zip file.. and just open the msi installer ;)





good luck
Reply:If you are using Windows, try the .msi file instead.


the install.bat file uses perl to make some file associationsand set some environment variables.


unzip the .zip package into a directory named Perl. use the create subdirectorys option.


This should leave you with 6 subdirectories:


bin, docs, eg, html, lib, and site.





use a text editor to make a file with the extension ".pl", right click and associate it with /Perl/bin/wperl.exe

business cards