Archive for category Perl

Google Hacking

I came across a line of hacking books today which proved fun. This hack for Google led to this modified script which runs the query live instead of pulling it from a saved results file:

#!/usr/bin/perl
# google_search.pl # Google Web Search Results exported to CSV suitable
# for import into Excel
# Usage: perl google_search.pl term1 term2 termN > results.csv

use LWP;

my $browser = LWP::UserAgent->new;
# Google doesn't like non-browser-based access:
$browser->agent('Mozilla/4.76 [en] (Win98; U)');
my $qstring = join("+", @ARGV);
my $url = 'http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=' . $qstring . '&btnG=Google+Search';
my $response = $browser->get($url);

print qq{"title","url","size","domain suffix"\n};

my($results) = (join '', $response->content) =~ m!<div>(.*?)</div>!mis;

while ( $results =~ m!<a href="?(.+?)"?>(.+?)</a>.+?\s+-\s+(\d+k)?!mgis ) {
	my($url,$title, $size) = ($1||'',$2||'',$3||'');
	my($suffix) = $url =~ m!\.(\w+)/!;
	$title =~ s!"!""!g;         # double escape " marks
	$title =~ s!<.+?>!!g; # drop all HTML tags
	print qq{"$title","$url","$size","$suffix"\n};
}

w3mir

Great web mirroring tool. So far, I’ve downloaded the perldoc site for Perl 5.8.0. I think I’ll load it on my class server so the students can have quick access to it. It’s all perl (of course), very easy to install (at least on windows, but I did need nmake.exe). Still trying to get it to work at home on my mac. It doesn’t seem to see the lib-www and MIMI::Base64 modules installed. Hmmmm. [w3mir homepage]

download plumm summer a divx

Link Checking again

This week’s perl drama encompasses our link checking again. So, after running Xenu

download guess who s coming to dinner

, there seem to be lots of different urls on our site that are pure javascript pop-ups. Our production folks have been able to revise a lot of those pages, but there are close to 100,000 pages on our site – far too many for a two person procuction team! So, I’m adapting some cgi’s I wrote earlier to go through the site and re-write the pages with all of these types of links. Basically, inserting the url after the href, adding the onClick handler, and adding a ‘return false;’ does the trcik and allows for any-old-link-checker to see them. But, I’m on windows, and the file-writing/directory-creating utilities are really flaky for some reason. I’m getting permission denied errors, files can’t seem to be saved in any created directories, etc., etc. I’m sure this too shall pass, but it’s a real headache.

download ghosts of girlfriends past the dvdrip

Link Checking and Site Mapping

download cadillac man divx OK, so at work, I’ve been perplexed by the myriad of ways we link to things. The link

checkers we have are not very good, and just follow textual links. The one that does follow javascript links is flaky and hangs my honking W2K analysis machine when working locally. I won’t mention any names [ahem ... Coast], but otherwise, it does a very nice job of sending me perl

-parse-able results in email. So, I finally figured out what to do. Write a perl script that loops over an entire directory, building a link to each html and cfm, or jsp page, what-have-you. Then, point the link checker to that site-map page and you’re guaranteed not to miss checking any pages that are orphaned. Whew, that one was giving me heartburn for quite a while.

Read the rest of this entry »

Perl Programming Power!

I just came across Michael Schwern’s stuff. He’s a persuasive writer! I think he outlines the meat of the problems that I had learning Java, and why I like Perl young frankenstein online it came from outer space dvd download so much.

Why I Am Not A Java Programmer free star trek insurrection “Perl is a concise language, designed to make it quick and easy to turn thought into code. Java is a syntactically simple and consistent language, designed to encourage good style [17] and be easy to embed. Each has their strengths and weaknesses, but people rarely agree on which is which. People are funny that way. Some want to save you from yourself by restricting you. Some want to let you be yourself by removing as many restrictions as possible. Both are fraught with peril. I happen to like the latter peril better.”

OO Perl

Here’s a good article from O’Reilly. I love the game of Go

download secret of nimh the free

too. perl.com: Object-Oriented Perl [Nov. 07, 2001]

bloodline free download

“But I think the most interesting thing I’ve found that Go and Perl have in common is that there are various different stages in your development as you learn either one. It’s almost as if there are several different plateaus of experience, and you have to climb up a huge hill before getting onto the next plateau.”

Content Management System (v. 2)

fast track no limits free

Content Management Systems

download gate the online CNET.com – News – Personal Technology – Short Take: Microsoft browser lead widens: “Internet Explorer browser is now used by 86 percent of Web surfers worldwide.” It’s almost a one-browser world.

After a year of implementing painful cross-browser designs, I say great! I really don’t care who wins the battle, as long as someone does, and we can then retrieve our sanity.

body of lies divx online download back to the future part ii dvd far off place a movie download 12/8/99 – Web Sites: Keep It Simple: “Perhaps the most important point he makes in our interview is that most Web sites today fall into the trap of “cranking up the volume” on their home pages. Here’s what they do wrong: Intent on capturing the attention of those who visit their sites, they load up flashy graphics, add more and more features, include more marketing hype, etc. All the “flash” is meant to entice site visitors to click on another link and explore beyond the home page.

Nielsen says that’s the wrong approach. Leave it to your outside marketing efforts to get people to know about your site. Then, when people do visit the site, impress them with your ability to “deliver the goods.” Simply do the best, most efficient job at giving users what they want; give them quality, not flash” Yes!

black sunday online

Content Management Systems

Today, after a client meeting, the topic turned to how we should be working our site production process. “Sametz” is a stongly design-centric company, and our sites emphasize that perspective. We came to the conclusion that we do things backwards. We force our production around a design, and we decided that that is the wrong prespective. If “Content is King” as the useability experts argue, then we should be building our designs around the content. That was Albert’s idea.
The way it should be….

Our sites should be built around the content, with no design whatso-ever, aside from a rudimentary navigation layout. We fill in the content the client gives us, provide a mechanism for client editing, using Manila, Dreamweaver, cgi, etc, it really doesn’t matter. At that point, we can hire a professional copy-editor to run through the content and web-ify it, allow for textual updates by the client, and investigate different design decisions as they impact upon the content.

free fiddler on the roof movie download

download kid galahad

Related links:

get smart download

Camworld’s CMS chart

Inside Media article

Stock Quote CGI Application

This a stock quote cgi application in Perl. This script was developed for ACT Manufacturing

and delivers 15 minute delayed stock information (since they declared bankruptcy, this script was taken down). The data source is a public site: XML Today

. The script will parse out a template page written in standard html. This separation of the script from the template allows designers to make changes without affecting the functionality of the application.

download taking 5 dvdrip

Read the rest of this entry »

Content Management Script (v. 1)

Developed a perl staging mechanism that acted as a web site staging mechanissm when used in conjunction with Dreamweaver. This script filters pages and publishes them to a live server after an editorial process is completed. This was developed as a low-cost, easily maintained alternative to complicated content management software. This is currently in use by the Joslin Diabetes Clinic cinderella ii dreams come true divx download beetle juice dvd , for whom this was developed.

Read the rest of this entry »