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

Best way to learn SQL and Perl?

Someone else has designed and built our database. Judging by the performance, he's done a great job. But I need to be able to find my way around it, write and run queries, etc. I'm fine with computers and have programmed, but ever since I tried to teach myself MS Access years ago, databases have given me the heebie jeebies. So I need to get past that and learn enough SQL to write my queries etc.





The database is built on MS SQL Server running on MS Server 2003, and the apps round about it address it using a mixture of Perl and dotnet, running on a mixture of Windows and Linux. I don't need to learn dotnet but Perl would be a good one to get into.





So are there any books or references that can help me here?





Thanks!

Best way to learn SQL and Perl?
I work for the largest internet portal in the world...


and we use perl a lot. Besides if you have to maintain perl processes, it's pretty stupid for people to suggest you learn a different language.





I learned perl from the O'Reilly book "learning Perl" It starts out with a little program and then explains the pieces and I found that a much better way to learn the to teach the pieces first. After I got through with it, I wrote a simple black jack game and that really made me pretty fluent.





A Visual Introduction to SQL by Trimble and Chappell is a great book to learn the basics of SQL.
Reply:visit:





www.perl.org


www.cpan.org
Reply:Are you sure you want to learn PERL, it is only really used to create CGI scripts and much of that can now be done using other languages?





Can I suggest you look at PHP or ASP as both of these are used to interact with databases and unless you plan on running SQL command through the SQL client then you will want to use these to produce easy to use interfaces.





I would suggest -





Apache,MYSQL and PHP, Weekend Crash Course by Steven Schafer ISBN 0-7645-4320-2





Clearly, it will take you a bit longer than a weekend (unless you plan on doing nothing else! and only ploughing through the book).





This was the first useful book I use to understand SQL. Which I think it the first criteria. SQL is pretty much the same which every database you are using, it is the administration of those databases that is the difference.





The microsoft books are really badly written and I feel that they are only useful once you know what you are doing. Eventually, you will probably need to read them but do some solid groundwork first and then you will be able to reap the benefit.





The other book that you could use is ASP Made Simple ISBN 0-7506-5869-x. Its cheap, get you up and going quickly but it is full of errors in the code...so it really helps your debugging skills!!
Reply:http://www.microsoft.com/sql/default.msp...





i *despise* perl. if you have any sort of managment or administration position at your company, might i suggest you migrate to python or ruby? :)
Reply:U can visit this helps u


http://www.microsoft.com/sql/default.msp


In PERL when declaring a struct, do you need to setup default values for each variable in the structure?

Perl doesn't have structs as C does, unless you're using the Class::Struct module from CPAN. So your question seems to be meaningless.

In PERL when declaring a struct, do you need to setup default values for each variable in the structure?
you mean a hash, not a struct?





in this case, you don't need to setup default values. Perl never needs default values.
Reply:You're the guy who keeps calling hashes "structs", right?


The simple answer is "no". In fact you don't need to pre-declare any part of the structure of a hash in Perl.


You don't need to declare explicit default values, but you have to know that Perl's default value is undef, and you have to properly handle the undef value in your program.

birthday cards

I have emacs and perl on windows xp. How to compile and run perl using emacs?

save the file in emacs. in command prompt type perl %26lt;filename%26gt;.pl

I have emacs and perl on windows xp. How to compile and run perl using emacs?
Save the program, say it's program.pl. Open an Emacs shell with M-x eshell. Type perl program.pl %26lt;enter%26gt;


Who is the first person to use the programming language PERL?

Perl, also Practical Extraction and Report Language is a dynamic procedural programming language designed by Larry Wall and first released in 1987.





Perl borrows features from C, shell scripting (sh), AWK, sed, Lisp, and, to a lesser extent, many other programming languages.





Larry Wall began work on Perl in 1987, and released version 1.0 to the comp.sources.misc newsgroup on December 18, 1987.





The language expanded rapidly over the next few years. Perl 2, released in 1988, featured a better regular expression engine. Perl 3, released in 1989, added support for binary data.

Who is the first person to use the programming language PERL?
PERL is designed by Larry Wall and first released in 1987.


Home Page : http://www.perl.org/





Download :http://www.perl.org/images/buttons/downl...





News : http://www.perl.com/





Books : http://www.perl.org/books.html


--------------------------------------...





Larry Wall personal Home Page : http://www.wall.org/~larry/





About Larry Wall : http://en.wikipedia.org/wiki/Larry_Wall
Reply:Perl stands for Practical Extraction and Report Language. Invented by Larry Hall, a Unix programmer who had got bored of the text handling limitations of the programming languages available at the time. Perhaps, the best thing about Perl is that you do not have to worry about low-level programming tasks like data types or memory allocation. It also gives strong support to regular expressions vital for any serious text processing task. Although certainly powerful and easy-to-learn, Perl can be cryptic at times.


Does anyone know a really good website that has free software to teach you C,C++,Perl,or Visual Basic?

I recommend that you utilize several methods to assist your learning process. Get several books on software programming; bookstore, library, e-books. As you study the various programming concepts and examples, one book may offer better explanations than another. Also, when you look at as many examples as possible, you get a better understanding of the practical applications.





Try to do work out as many programming problems as possible. And finally, review, review, review. Hopefully, you will be supplement your learning with e-books, and possibly joining a forum or two.





By joining a forum—or two, you can pose questions when your are truly stuck on a problem—and receive concise and intelligible responses.





Is there a community college in your area that offers programming courses?


______________________________...





FREE ON-LINE TUTORIALS





Tutorials http://www.w3schools.com/





tutorialtastic.co.uk





Tutorials—comprehensive listings: http://www.tutorialized.com





http://www.techbooksforfree.com/microsof...





The Code Project - Free Source Code and Tutorials: http://www.codeproject.com/vb/net





Sams Teach Yourself... http://www.samspublishing.com





Visual Basic code snippets http://www.a1vbcode.com/search.asp





C++ tutorials: http://www.cprogramming.com/tutorial.htm...


____________________________





E-BOOKS





http://freetechbooks.com





http://www.freecomputerebook.net





http://freeprogrammingebooks.com





http://www.ebookdy.com








Good luck.





_________


Configuring NO$GBA to play Pokemon Diamond and Perl?

Went i play the game I'm having problems. It goes slow, i see through objects including my character, I see the game's structure. Please help me! I need to hack the game to make codes so help me fix this. You can recommend another emulator and tell me the settings for that one if you want to.

Configuring NO$GBA to play Pokemon Diamond and Perl?
Sorry, wait til a newer, better version of no$gba comes out. =\ No settings or computing power can currently make the emulator run better than 60% speed in 3D environment.

sepal

How would you connect a perl script to a website?

ok.i have a dell windows xp.i use cable as my internet..and it is a desktop too..well i want to connect this perl script to a website and if i need a program or software..let me know the name or website were i can download it..

How would you connect a perl script to a website?
To run perl scripts on your local machine then you will need to download and install a perl server.





A free one is available at :


http://www.wampserver.com/en/





You will also need the activestate perl add-on:


http://www.wampserver.com/en/add-ons.php





After installing both of these you will be able to run perl scripts - check the wamp help files for where to put the perl files.





Another option is to upload the perl files to an external webserver. If you have one of these you will usually need to put the perl files in the CGI-BIN
Reply:To clarify the above response, "cgi-bin" is a folder that a web host typically allows Perl scripts to run in. The thing you should really look for is whether or not your web host supports Perl CGI, so contact them first. If they say yes, then you will need to do two things:


1. Figure out where these Perl scripts can execute, which should typically be in the cgi-bin folder.


2. Set the correct permissions on the file. If you have FTP or shell access, poke around until you find some place that allows you to change the file's attributes (sometimes listed as "properties"). In there, should have an option to set the eXecute permissions.
Reply:To run a perl script on a website you need a cgi-bin directory on your webserver.


I need to install PERL module, but I don't think I'm admin... can I install through SSH?

I have permissions to some folders including a CGI-BIN to a website, and I use an SSH client tool. I can run some shell scripts as well. Is that enough if I want to install an additional PERL module in the Apache Web Server? Don't know if I need more, or which directory to try it at.

I need to install PERL module, but I don't think I'm admin... can I install through SSH?
No, SSH will not give you admin permissions. Luckily, you can install Perl modules anywhere you want. See link below. Here is an excerpt:





you can install modules into any directory you wish. For instance, where I say perl Makefile.PL, you can substitute perl Makefile.PL PREFIX=/my/perl_directory to install the modules into /my/perl_directory. Then you can use the modules from your Perl programs with use lib "/my/perl_directory/lib/site_perl"; or sometimes just use "/my/perl_directory";.
Reply:Hey, why you do not change the permission ???
Reply:You need to install the module to your home directory instead of the system paths, here's a small writeup in how you setup the proper environment at runtime





http://wiki.developers.facebook.com/inde...


In perl regex, how do you search for just the last letters of a word?

I have a text file that I would like to search and replace leaving only the first letter of words and punctuation remaining. I don't want to delete words like "a" and "I" either. What regex should I use? (I have a text editor that uses regex to search/replace.)

In perl regex, how do you search for just the last letters of a word?
sofarsogood is wrong. You don't need to escape the parens.


You also need a /g flag in the end





Try something like this instead


s/(\w)\w*/g;





should do what you want.


except, it keeps not only punctuation, but anything, that's not a letter, digit or underscore. If you truly mean to preserve only punctuation, that the easiest would be to do a second pass with





s/[^\w .,;?!: ]//g;





it will strip all the "extra" symbols left over from the first substitution.
Reply:I haven't used perl in a while, but for other regexp I would use something like





s/\([a-z]\)[a-z]+/$1/i





This saves the first alpha char in register 1, and then when it preceeds a nonempty string of chars replaces the whole thing with the first char.





But my suggestion: use emacs!


Where i can write a perl language like i can write html in notepad?

how per language starts like html start like


%26lt;html%26gt;


and ends with


%26lt;/html%26gt;

Where i can write a perl language like i can write html in notepad?
You can not write a Perl program if you don't even know simple concepts like this. There are dozens of books for learning Perl, check your local library.


As for the person who asked a question in their answer (cheater!), ActiveState makes a full-featured IDE for Perl, it's called Komodo.
Reply:A Perl script doesn't have a special start text. It's just a file with a '.pl' expression.





If you want UNIX to run it without using "perl ", then you can start it with





#!/usr/bin/perl





(Replace the above path with the actual location of your Perl executable)
Reply:Yes thats right but I was also wondering, is there a program like dreamweaver to edit a pearl language, you know the debugging features of dreamweaver ftp integration colored script lines etc. Is there? anyone?

printable cards

Can I pass an array as a parameter in a perl/cgi form?

If you add


local $" = "\n";


before your print statement, your array will appear in the hidden field with one item on each line. Then when you receive the submission you can do





my @array = split(/\n/, param('name'));

Can I pass an array as a parameter in a perl/cgi form?
Can we have some more details, please?


show form and script separately.





are you using cgi.pm?


==================


OK, do I understand you?


You want to pass an array into the value of a hidden field of a form?








The form is HTML code.


The hidden field can have only one value.


An array is more than one value!





loop through the array, writing one hidden field for each iteration.


Installing the ODBC drivers in Perl DBI?

Can anyone help with the above? I am just learning Perl, and am progressing through database connectivity. I have MSOffice on my computer which therefore means I would prefer to use an ACCESS database, but my version of Perl, v 5.8.8, does not seem to have the ODBC drivers. At least it doesn't list it when I ask for a list of available drivers.


When I went searching for questions,I found 195,265 web references to (perl, DBI), 169,489 references to (Perl, ODBC) and 58,480 references to (Perl, ODBC, install). I have looked at several of these and they all seem to go on about building the Perl DBD.


So how do I go about a) getting the driver and b) setting it up?

Installing the ODBC drivers in Perl DBI?
If you go to this site it explains every thing.


http://www.easysoft.com/developer/langua...


What is perl script and what can one use it for?

it is a language to do things on server. You can use it to receive data from forms, send emails, connect to a database, extract reports and other stuff





More info:


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

What is perl script and what can one use it for?
Perl is a mature programming language with its origins in UNIX. If you are running Mac OS X, Linux, BSD, or another UNIX or UNIX-alike then you probably have it installed on your system already. If you are running Windows then you can find details of several different distributions of Perl at http://win32.perl.org/wiki/index.php?tit...





Perl 6 is expected to arrive in the next few years http://dev.perl.org/perl6/





A Perl script is a piece of software written in Perl. The line between "program" and "script" is not clearly defined and there is a lot of debate about the subject. See http://perlmonks.org/?node_id=556842 for more information.





As for what Perl can do, many people's experience of it is limited to its use in CGI scripts (CGI is a way for a webserver to run a program in response to getting a request for a URL instead of just opening a static file), but really the answer is "practically anything". http://www.perl.org/app.html lists some resources for Perl toolkits for building web applications, regular graphical desktop applications, talking to databases, and more. There is also a large collection of third party modules which cover almost every topic under the sun at CPAN: http://search.cpan.org/





It would be easier to describe what Perl can't do - it isn't very good when it comes to performing really low level operations with hardware, but see http://perlmonks.org/?node_id=516556 for a wider view.





(There is also PerlScript (as opposed to "a Perl script", which is a means of using Perl inside ASP or client side in Internet Explorer, but it isn't very common. See http://aspn.activestate.com/ASPN/docs/Ac... )
Reply:Perl is an older computer language that is used for many different things.





http://cgi.resourceindex.com/Programs_an... take a look at the script categories and you'll see just what it does.


Try # 2. How can I Move a list of files using a perl script?

I would like to move a list of files (contained in text file) from one folder to another. The files to be moved will have long file names and the text file will only contain the listing of files to be moved. For example:


pic.bmp


lots of stuff.doc


junk.txt


The OS is Windows XP

Try # 2. How can I Move a list of files using a perl script?
# UNtested code


use strict; use warnings;


use File::Copy;


open(LIST, '%26lt;', 'the text file') or die;


while (my $sFname = %26lt;LIST%26gt;)


{


chomp $sFname;


move("one folder/$sFname", 'another');


} # while


__END__

love song lyrics

Help, when I try to launch more than 2 perl scripts to run at once they all get error messages?

I want to run more than 2 perl scripts at the same time.





I don't know how to write or edit them. I just know how to execute them. The processes are very long, Because of that I need to start about 15 at the same time . when I try to run more than 2 at the same time from my pc I get error messages on all of them a few seconds after I run the third one.. I am not sure if it's my isp's server getting tripped up. I don't understand how it could be my cpu because 2 scripts use very little resources.. Is there a service where I could upload them execute like 15 at the same time from an external source or maybe even arrange and adjust the execution of the scripts? .. Thanks

Help, when I try to launch more than 2 perl scripts to run at once they all get error messages?
What is the error message? They're probably trying to read/write the same temp file or something like that. You need to rewrite the code so that it doesn't use the same resource twice.


Does anyone know how to provied a Perl CGI that processes the data from a html form.?

The html form took an order for pizza comany. The Perl CGI script is to processes the input data from from than and output a summary as follows:





Your Name: user_input_name


Your Address: user_input_address


Your Telephone: user_input_phone


Instructions: user_input_instructions





The for will read this, (but don't worry about this part);





1. pizza_name1, pizza_quantity1, price_per_pizza1, subtotal1


2. pizza_name2, pizza_quantity2, price_per_pizza2, subtotal2


3. ...





The total is total_price.


Thank you for your ordering!

Does anyone know how to provied a Perl CGI that processes the data from a html form.?
Check out these form processing scripts based on Perl and choose the one that best suits your needs:





http://cgi.resourceindex.com/Programs_an...


Is there any limitation in perl that it can zip or unzip file that are less than 4 GB?

Give me suggestions, if u have, if this exists.

Is there any limitation in perl that it can zip or unzip file that are less than 4 GB?
I think yes...


Because in my view as the address are in 32 bits so maximum size it can refer will be 2^32 that is 4 GB.


Thursday, July 30, 2009

Exponentiation of a scalar variable to the power of e in perl. How?

Maybe something like this:





$a=$b**e;





'e ' being the constant e

Exponentiation of a scalar variable to the power of e in perl. How?
my $e = exp(1);





$a = $b ** $e;

greeting cards

How to delete a first word of each line in a file using perl?

it should delete a first word of each and every line in a file using perl commands

How to delete a first word of each line in a file using perl?
#!/usr/bin/perl -w





use strict;





open( INPUTFILE, "input.txt" ) || die "cannot open input file: $!\n" ;


open( OUTPUTFILE, "%26gt;output.txt") || die "cannot open output file: $!\n" ;


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


s/\w+\s//;


print OUTPUTFILE "$_";


}


close(INPUTFILE);


close(OUTPUTFILE);


exit 0;


Where's a good site to learn how to Perl script iTunes on Windows?

Here's one:


I'm learning Perl from a book. It says I need to add a directory to the PATH variable in my shell. How?

I know where this directory is. The book says I need to add it to the PATH variable in my shell. How do I do that?

I'm learning Perl from a book. It says I need to add a directory to the PATH variable in my shell. How?
the reason you are not getting a good answer is because it's different depending on what kind of computer operating system you are running!





Windows goes by the file extension (.pl is for perl)





Unix goes by the 'shebang' line at the beginning of the program





But perl is often run from the command line or in a bat file, or a shell script, so you have to have an updated path. And you set it differently for each OS!





SO WHAT ARE YOU RUNNING? Windows version? Unix Shell? Mac? Other???








OK so you are running windows, if you installed perl correctly it should have added the perl directory to the path! It's done by the activestate perl installer.





http://aspn.activestate.com/ASPN/docs/Ac...
Reply:Hold on now, on Windows you should NOT have to modify your path for perl to work. What exactly did the book tell you to do? What version of perl are you using?
Reply:That depends on what shell you use.





In bash, for example:


export PATH=$PATH:/path/to/new/directory/





In Windows Explorer (the default shell for Windows since Windows 95) right click on My Computer, select properties, pick Advanced, pick Environment Variables, then find it in the dialog.


How does visual basic compare with other programming languages such as FORTRAN, Java and Perl?

Visual basic is a fairly easy language to pick up. However, it is generally not used to make very large applications. VB was also created for MS Windows.





I have almost no experience with perl. As TJ said, it is primarily a server side language. It is also sometimes considered a 'duct tape' language that can quickly fix things or solve problems.





Java is a very versatile and portable. It uses a program called a java virtual machine (JVM) to run partially compiled code on any machine. This allows the developer to write one program that will be able to run on Windows, Solaris, Unix, Linux, OS X, etc. A JVM is available for every major operating system. Technology has improved since it was first released many years ago. This allows java based programs to run much faster than they could when java was first created. However, it is still not quite as fast as some languages and it can use more system resources to run the application.





While updates to the fortran language specifications are still being made, for the most part, is dead. The only places you really see it used are in older systems. Some companies have a lot of their software based in old, dead languages and replacing their software with the newest programming languages would not be cost effective while the old software still does its job. Because of situations such as this, some people still learn fortran. As said by another person, it used to be considered 'the scientific programming language' due to its speed and accuracy in numerical computations.





C++ is one of the primary languages used for large application development. It is complete and fast. However, it is not portable as java is. If you want to run the program on a Unix machine, it must be compiled to do so. If you want to run the program on a Windows machine, you will have to re-compile it to run on windows. Furthermore, the language doesn't have nearly as many of the features built in to it as Java. Java has standard libraries that allows the programmer to create graphical user interfaces. C++ must use 3rd party libraries to create GUIs. While there are some cross-platform libraries, most are not. Thus, if you write a C++ program for windows, unless it is a simple program, you will probably not be able to recompile it for another system without making modifications. C++ allows the user more control over memory manipulation and allocation that languages such as Java or VB. This can be very useful, but it can also allow the programmer to easily shoot himself in the foot if not careful.

How does visual basic compare with other programming languages such as FORTRAN, Java and Perl?
Sort of an odd question, but...





FORTRAN is fairly outdated. Once the "scientific" language, it's been replaced by C/C++ (note - I've worked in all these languages).





Perl is mainly server-side. You don't really make desktop apps in Perl.





Java is a mix - it's very C-like, and very well designed, but you need a Java Virtual Machine (JVM) to run it. Most machines have that installed nowadays. It's platform-independent.





Visual Basic is more designer oriented, but you can write nearly anything in it, although for some things you'd be better off just working in pure C. It's not platform-independent like Java, but it's a bit more "accessible".
Reply:I guess that depends on what you're planning on using it for. VB is extremely strong at making Windows Forms (meaning, any program that pops up in the Windows environment. i.e.-Notepad, Calculator, Word, Excel, etc).





However, its portability is non-existent. VB is a Windows-only language, so from a business standpoint, it's almost useless.





Most companies will use Java or another highly portable language (C/C++) to deliver their products.





Again, it all depends on what you need it for :)

flower arranging

Are hashes and structs the same in PERL?

Please explain or give a quick example if they are different.





Thanks

Are hashes and structs the same in PERL?
No, perl hashes and c structs are different in several ways. Perl hashes allow you to dynamically assign key/value pairs in a dictionary-like way. Perl hashes allow allow you to store and retrieve complex data sets as well.
Reply:I am assuming you are talking about C to PERL.





For structs, see this linke: http://www.bke.hu/tyby/perl/advprog/ch02...





for hashes see here: http://www.wellho.net/mouth/43_Hash-of-l...


How are you install perl server in windows XP?

I need to explain way the cgi install and mysqlDB install with perl server

How are you install perl server in windows XP?
install apache! and install perl... and install mysql... then install DBI from cpan.





it's all out-of-the-box!
Reply:Get an easy-to-install perl distribution here (http://www.activestate.com/Products/Acti...


Will an application written in Java or Perl know if there are two network cards on a machine?

I'm interested in Linux particularly. If I want one application only to communicate over a private LAN through one network card, and another to communicate over the WAN through another network card, do I make them listen on different ports and use iptables to route incoming and outgoing traffic from the right networks to the right ports (with the right application listening on each port)?

Will an application written in Java or Perl know if there are two network cards on a machine?
the correct way is to set up routing.





some addresses are automatically set to go to the local net and others are defaulted to the main router and off to the internet.





I know Perl%26amp;Java can handle the routes but neither deals with actively routing to particular address on different ethernet cards.


How can I get the Timezone in my PC using PERL? or JavaScript?

I'm trying to make a webpage that shows your PC's set timezone

How can I get the Timezone in my PC using PERL? or JavaScript?
%26lt;!-- TWO STEPS TO INSTALL BASIC CLOCK:





1. Add the onLoad event handler into the BODY tag


2. Copy the coding into the BODY of your HTML document --%26gt;





%26lt;!-- STEP ONE: Insert the onLoad event handler into your BODY tag --%26gt;





%26lt;BODY onLoad="clock()"%26gt;





%26lt;!-- STEP TWO: Paste this code into the BODY of your HTML document --%26gt;





%26lt;!-- Adjust the placement of the clock in the line below --%26gt;


%26lt;span id="pendule" style="position:absolute;left:300;top:20...





%26lt;SCRIPT LANGUAGE="JavaScript"%26gt;


function clock() {


if (!document.layers %26amp;%26amp; !document.all) return;


var digital = new Date();


var hours = digital.getHours();


var minutes = digital.getMinutes();


var seconds = digital.getSeconds();


var amOrPm = "AM";


if (hours %26gt; 11) amOrPm = "PM";


if (hours %26gt; 12) hours = hours - 12;


if (hours == 0) hours = 12;


if (minutes %26lt;= 9) minutes = "0" + minutes;


if (seconds %26lt;= 9) seconds = "0" + seconds;


dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;


if (document.layers) {


document.layers.pendule.document.write...


document.layers.pendule.document.close...


}


else


if (document.all)


pendule.innerHTML = dispTime;


setTimeout("clock()", 1000);


}


%26lt;/script%26gt;


Hope this helps!!!

flower arrangement

In Perl, how do I add elements of an array using a loop?

Using Perl:





I tried using a for loop but it keeps printing out the last element in the array with the total. (i.e. "410" 4 is the last element and 10 is the total)





for($i=$#ARGV; $i%26gt;=0; $i--)


{$sum += $ARGV[$i];}


print "$sum\n";





Furthermore, how would I pass @ARGV to a subroutine and what would the "function" call in the main program look like?

In Perl, how do I add elements of an array using a loop?
Is there a particular reason you want to process the array in reverse? You should avoid $# if at all possible. map is an elegant way to process all elements of an array:





my $iSum = 0;


map { $iSum += $_ } @ARGV;


print "$iSum\n";





You can pass @ARGV to a function like this:





my_function(@ARGV);


sub my_function


{


local $" = ',';


print "my_function got args (@_)\n";


}
Reply:first off i ran that loop exactly as is and it worked fine, i put in 1 2 3 4 and got out 10 not 410. so im not sure why it isnt working for you. i really did run character for character the same loop.





as far as passing @ARGV to a subroutine, you could do this:





print sum(@ARGV);





sub sum {


while ($num = shift) {$total += $num}


return $total;


}
Reply:you need to use while or do loop.


Bangalore: I want to learn PERL scripting?

I am looking for a PERL scripting course in bangalore near to koramangala area. Could some one suggest good places where I can take up this course

Bangalore: I want to learn PERL scripting?
Go to Integer in Koramangala, Opp to Raheja Arcade, Cegon Soft Jaynagar, Banaswadi


How do you gather user input with an Open Office Basic or Oo Perl macro? (Preferably without an input box.)?

Basically I need to write a macro that allows the user to select a number of diacritical marks (ἀἁἂἃἄἅἆἇᾀᾁᾂᾃᾄᾅᾆᾇᾰᾱᾲᾳᾴᾶᾷ), select a letter to apply them to, and then the macro will pull the proper letter from the unicode font (Gentium in my case).





Ideally, the typing process would go something like this:





%26lt;Ctrl%26gt;%26lt;Shift%26gt;%26lt;Alt%26gt;d activate the macro.


Press ' selects for the ἀ to be added to the final letter.


Press , selects for the ᾳ to be added to the final letter.


Press a inserts the ᾀ into the document at the current cursor position, and break.





The process behind the macro should go something like:





1) Take user input.


2) Determine if user input is a diacritical mark, or if it's a letter.


3) If it's a diacritical mark put that mark on the list to be added to the letter; go to 1.


4) If it's a letter, check to see if the diacritical marks currently selected apply to that letter. If not, then break. If so, output the letter with the applied marks.





Any ideas?

How do you gather user input with an Open Office Basic or Oo Perl macro? (Preferably without an input box.)?
Try AutoHotKey at www.AutoHotKey.com! I use it all the time.


Editing Registry through a Batch file or Perl?

I would like to be able to add/edit/remove registry entries from a batch file or a perl script.





Basiclly im trying to add an entry to change my mac address so say its in this folder:


HKEY_LOCAL_MACHINE\SYSTEM\


CurrentControlSet\Control\Class\


{4D36E972-E325-11CE-BFC1-08002BE10318\...





and i need to add this registry entry


Name: = NetworkAddress


Type: = REG_SZ


Value: 001122334455





How would i go about doing this? commands or lines of code would be helpful thnx.

Editing Registry through a Batch file or Perl?
# UNTESTED CODE


# PROCEED AT YOUR OWN RISK


use Win32::TieRegistry(Delimiter =%26gt; '/');


my $key = join('/', qw( LMachine SYSTEM CurrentControlSet Control Clas... {4Dwhatever} ));


$key .= '/';


my $hash = $Registry-%26gt;{$key} or die "Can't find the registry key: $^E\n";


$hash{'/NetworkAddress'}= "0011whatever";
Reply:Why edit the registry at all is it a static ip address yoru dealing with?





You can make a batch file of say:





ipconfig /release


ipconfig /renew


exit





Which will give you a new address on your network card from your routers built in DHCP server. That will usually get you back on a dropped or locked internet connection.

eurovision song contest

How to fix "From address not in member domain" with perl?

I used Perl to send email from my form, and I'm getting "From address not in member domain." error.





I read similar problem with PHP, does anyone know how to solve with Perl script?





Thanks!

How to fix "From address not in member domain" with perl?
If you're using FormMail, you need to add your domain (whatever.com) to the accepted domains in the script.





Otherwise, you are probably getting this error because you are trying to relay messages; that's something you need to configure on your SMTP server, not with a Perl script.


Installing activestate Perl on Windows Vista?

Two questions, really.





Anyone install ActiveState perl on Vista before? I tried and it told me it couldn't set the path and I have to add it manually. I added C:\Perl AND C:\Perl.exe to the path and it didn't work.





The install went fine but it says in the command line that 'perl' isn't a recognized name.





Anyone know what the path is or why it's not working?

Installing activestate Perl on Windows Vista?
The path is the FOLDER where perl.exe is stored, not the program itself. Try C:\perl\bin


Why is it that most ASP.NET pages executes very slow compare to PHP and Perl Scripts?

Scripts execution depends with the Server Configuration.

Why is it that most ASP.NET pages executes very slow compare to PHP and Perl Scripts?
Actually I have not seen such a delay with php and asp.net pages. But since php is a interpreted language (that means, it will be interpret, every time it show on the browser) php should be slow.





But asp.net pages are compiled pages. So they should execute faster than the php.





Delay can course by the amount of data php or asp.net page holds.
Reply:i don't think they are slower. maybe the ASP pages you looked at were more complicated or had bad quality, or their server is slower (it's a windows server, so that wouldn't be a surprise ;) )





i think performance is equal for all those languages.





btw: they are ALL compiled just once, and the bytecode is cached.
Reply:ASP .NET pages are not directly interpreted unlike PHP and PERL. ASP is first converted to IL (intermediate language) and then interpreted so it increases the time taken by it to get executed. I guess now you know how many times does PHP gets interpreted ? Well, if you are as brilliant as I am, the probably you still don't know the answer. Well PHP and PERL are interpreted just once, hence making them faster.
Reply:ASP.NET is based on a powerful framework therefore it do a lot work of the things on the server.


PHP and Perl are faster because of their simple architecture.


How do you get to sunnyshor city on pokemon perl I hav 7 bages?

visit this site


http://www.serebii.net/diamondpearl/gyml...

wedding song

Do you know the host that provides free hosting with my indvidual ads and perl support?

freewebs...at www.freewebs.com

Do you know the host that provides free hosting with my indvidual ads and perl support?
no i do not. but try freewebs and let us know..


Does sombody now were to get the mysterious gift on pokemon dimond and perl?

Watch this it will teach you everything you need to know about the mystery gift:





http://www.youtube.com/watch?v=S_fuwRmXK...


How can show a Perl(.pl) page as default home page?

I have a website www.unblockz.com. Now it has an index page(.html) redirecting to the perl page on loading of the site. But I need it to be done without redirection. When I enter www.unblockz.com, then automatically load that Perl page as the home page. How can I done it. Anyone can help me ?





eg : www.unblockmath.com - this site using the same perl script and it is working fine. When a visitor enter the sites URL, it shows the script page as default home page

How can show a Perl(.pl) page as default home page?
several ways... depending on how the apache server was built.





1 modrewrite to internally re-direct the home page to the cgi.


2 config the server to look for index.cgi if it doesn't find index.html


3 or the classic meta refresh.





but, are you sure the home page on unblockmath is from a perl program? it looks like a static html page.


(PERL)How can I use the password and username stored in cookie files to access the web automatically?

To access some websites, not only the username/pwd is need, but also a


field need to fill based on a randomly generated digitals/letters on an


image(this will prevent the automatically account creating, such as


when creating the MSN account, the website will ask us to fill that


kind of data).





When I first accessed the website using firefox or IE, I must fill the


username/pwd and that kind of field. And if I close the browser and


open it a second time to view the same website, there is no need for me


to fill username/pwd which means firefox/IE can use the cookie to


access it. And I tried to use the cookie using be IE by model


HTTP::Cookies::Microsoft in the code, but the response from the web


server still can NOT recogize that I already logged in.





my $cookie_jar = HTTP::Cookies::Microsoft-%26gt;new(


file =%26gt; "$cookies_dir\\index.dat",


'delayload' =%26gt; 0,


);


my $mech=WWW::Mechanize-%26gt;new(cookie_jar=%26gt;$c...


$mech-%26gt;get("http://bbs1.2

(PERL)How can I use the password and username stored in cookie files to access the web automatically?
from what I read you are trying to create a script that mimics a logged in user. but are getting caught at the login stage.





I would be surprised if any (reputable) website stores a username, password combination in the browsers cookies, most will store a session id. More often than not the cookie is stored only for the lifetime of the browser. in other words it is never stored on the hard drive, so you can't access it using HTTP::Cookies::Microsoft-%26gt;new(...

stamen

How do python, ruby and perl compare? which one is best in what areas?

Python has a much cleaner syntax and is easier to read, no braces, and auto-indent is forced. I prefer it to Perl. Have not used Ruby.

How do python, ruby and perl compare? which one is best in what areas?
Ruby for web development in conjunction with Rails.





Python I *think* is good for math.





Perl is quick and easy, used a lot in bioinformatics for random tasks.





Maybe the better question is what are you looking to do, and what language would fit that? Or is this homework?


How to resolve Perl error "Prototype mismatch: sub main::prompt ($;$) vs none at inc/Module/Install.pm line" ?

1. Do not use prototypes in Perl.


2. You are using a module which exports a prompt() function that redefines another prompt() function.


3. Show us your code, or tell us exactly what you're trying to do. We can not give a complete answer with just the error message!


What is the latest version of Perl?

What is the latest version of Perl and how different is it from earlier versions (such as Perl 5)?

What is the latest version of Perl?
The latest perl 5 is 5.8.8. For all intents and purposes, that's the latest version. Perl 6 is still under development, but there's an experimental implementation "Pugs."
Reply:7.3.2.4.1.5.1.5.1
Reply:check out


http://www.perl.com/download.csp


How to pass parameters from java script to Perl?

Javascript submits a form that prompts the user to enter data. In the form part, I am trying to call a perl script that should take the parameter values entered; document.form1.compName.value and document.form1.compPackage.value:


%26lt;FORM action="myPerl.pl" "-comp document.form1.compName.value -pkg document.form1.compPackage.value" Method=get name=form1 onsubmit= "return form1_onsubmit()" %26gt;





My Perl script gets called successfully but the parameters are not passed. I use


use Getopt::Std;


GetOptions( "comp=s",


"pkg=s",


);





getopts("f:");


if ($opt_comp) {


$comp = $opt_comp;


}


if ($opt_pkg) {


$package = $opt_pkg;


}





The perl script works fine from a command line:


myperl.pl -comp 'compname' -pkg 'pkgname'





any help?

How to pass parameters from java script to Perl?
Command line and CGI (Common Gateway Interface) are two separate things. You'll need to access your form parameters through the query string, which'll look like ?compName=xxx%26amp;compPackage=yyy. The thing you're trying to do in your form tag is invalid -- there can be no attribute-less values in XHTML/HTML. See second source for more information on forms.





$cgi_form = new CGI::Form;


$comp = $cgi_form-%26gt;param('compName');


$pkg = $cgi_form-%26gt;param('compPackage');





Have not tried this myself. You'll need to install and/or use the CGI stuff. See first source for more CGI-related information.

sim cards

Is there any use by learning perl language because presently all projects are moving towards java?

Yes.





Whoever told you all projects are moving towards Java has no idea what they're talking about. Different languages are good at different things so each has their own place. Just like you have more than one tool in a toolbox and don't just use a hammer for everything.

Is there any use by learning perl language because presently all projects are moving towards java?
Perl looks like someone ate Java, PHP, and Ruby for dinner, and then regurgitated it all up. A lot of older projects that were written in Perl stay in Perl, because no one wants to spend the time %26amp; money on upgrading them. As far as I know, what's popular right now is ASP.


Can PDFs be created using the PERL programming language?

Adobe made PDF opensource a few years ago, so any developer can get their hands on it - you just need a server side app to chuck data at.





http://homokaasu.org/rasterbator/ does PDF via the app iText - I'm not sure if they're using Perl, but check out www.sourceforge.net - bound to be something there.





[Addition] Just asked a friend who does Perl and he said search for cpan but it's very fiddly. cpan.org


Getting following error during execution of perl script : Insecure dependency in `` while running setgid?

I am calling perl script from C++ program, and getting following error:


Insecure dependency in `` while running setgid at





Thanks for your help

Getting following error during execution of perl script : Insecure dependency in `` while running setgid?
at the command line, type


perldoc perlsec





or just google for that error message


How do I parse a pdf file with perl?

I haven't done this in Perl but I have in ColdFusion to retrieve and set form variables dynamically in a PDF doc. The first step is to open the doc in Notepad and examine the syntax to check for the text you want to parse out. Then read in the file into Perl and look for the strings that delimit the text you are interested in. Good luck, it isn't easy to do as PDF files aren't really setup to be used like this (they are more for layout of the data and trasmitting the raw data) so you may need to kind of hack together a solution to work.

garden ridge

How to pattern match the multiple lines using perl?

for example


if i have 200 hundred line file .i want to match the lines in between the satarting word and the ending word.that is i want to match the multiple lines using perl commands.

How to pattern match the multiple lines using perl?
use the 'g' modifier. for example ~/^first.*last$/g
Reply:look this is the correct answer. %26amp;@)%$))(#%26amp;%26amp;#^%%@%26amp;@((#) thank you very much
Reply:use the 'g' modifier. for example ~/^first.*last$/g
Reply:perldoc perlre


Can you metion me some PERL features and application?

I'm new with programming and would like to study dynamic web languages ^^

Can you metion me some PERL features and application?
CPAN, CPAN, CPAN.





Perl is a great language, but perhaps its greatest strength is CPAN. This is a *huge* collection of contributed modules that give you a lot of already-written, tested, and working perl code to solve many problems.





Other Perl features:


- regular expressions: a compact way to talk about strings generically (e.g., a multi-digit number is \d+).


- Access to system-level functions from your program.


- automatic garbage collection and dynamically-resizing aggregate data structures


- hashes: key-value pairs


- dynamic data structures; automatic garbage collection


- natural-language like: there's more than one way to say things, so you can use the one that fits.


- a large and enthusiastic following
Reply:The overall structure of Perl derives broadly from the programming language C. Perl is a procedural programming language, with variables, expressions, assignment statements, brace-delimited code blocks, control structures, and subroutines.





Perl also takes features from shell programming. All variables are marked with leading sigils. Sigils unambiguously identify variable names, allowing Perl to have a rich syntax. Importantly, sigils allow variables to be interpolated directly into strings. Like the Unix shells, Perl has many built-in functions for common tasks, like sorting, and for accessing system facilities.





Perl takes lists from Lisp, associative arrays from awk, and regular expressions from sed. These simplify and facilitate all manner of parsing, text handling, and data management tasks.





In Perl 5, features were added that support complex data structures, first-class functions (i.e. closures as values), and an object-oriented programming model. These include references, packages, and class-based method dispatch. Perl 5 also saw the introduction of lexically scoped variables, which make it easier to write robust code, and modules, which make it practical to write and distribute libraries of Perl code.





All versions of Perl do automatic data typing and memory management. The interpreter knows the type and storage requirements of every data object in the program; it allocates and frees storage for them as necessary. Legal type conversions are done automatically at run time; illegal type conversions are fatal errors.


PERL - how can I substitute text from another file into my perl script?

I am not talking about creating a subroutine.





I simply want to automatically substitute text from other files into perl scripts at certain places before I run it.





Is there a simple way of doing this?





(Note, I cannot do this with subroutines, since I want to substitute the beginning of a loop from one place, the middle from another, and the end from yet another)

PERL - how can I substitute text from another file into my perl script?
If I get your question right, this is what you want.


Your perl file is actually some kind of a template where there are placeholder variables whose values will be known at run time from another file, and you need some way to replace the correct values in their correct places.





I once had a similar requirement and I resolved it by writing another program (you can write this one in perl, I chose java) that takes the template you have and create a new perl script with the placeholder variables replaced with those in the other file.





You need to execute this newly generated file now.
Reply:in the text files that are replacements, have the text formatted the way you want , whatever, ready to be inserted . .and





in the 'master' perl program that does the calling use the unix/linux cat command within backticks like





$the_file_contents = `cat /home/httpd/www/reaplace1.txt`;





then voila, all the text is in there ready to be manipulated like any other scalar variable
Reply:In a word, 'eval'.





I imagine your program would end up looking a bit like this:





my $execText = "";


$/ = undef;


$execText .= %26lt;"top.pl"%26gt;;


$execText .= %26lt;"middle.pl"%26gt;;


$execText .= %26lt;"bottom.pl"%26gt;;





eval {$execText};





This wouldn't be a smart way to solve most problems. If you want to execute code in another file, use the traditional constructs 'require' and 'use'. You'll be glad you did.