Displaying posts filed under

PERL

Sep
26
2009

A PERL script to get Twitter user information

If you are a Twitter user and do business on Twitter, you probably think about how I can target to a group of Twitter users, such as living in certain region or having similar interests. Can we screen Twitter users and target to a given population of Twitter users? Answer is absolutely positive: yes, we [...]

Sep
19
2009

Automatically send updates to Twitter

Here is a PERL script I developed to automate Twitter update activity. The fundamental thing is you have a database and all updates are stored there. You are sick of sending all Twitter updates manually. As long as you meet these two criteria you can keep reading. Otherwise, stop here. The PERL source code is [...]

Sep
5
2009

How to split a MySQL dumped file into tables

I maintained a MySQL server and automatically dump everything on the server to a file. The dump process is achieved by a shell script.

#!/bin/bash
date=`date -I`
mysqldump –add-drop-table -u xxxxx -pxxxxx usbargains | gzip > /samba/dat$
mysqldump –add-drop-table –all-databases -u xxxxx -pxxxxx | gzip > /samb$

To be aware that the username and password in the above shell [...]

Aug
20
2009

Use PERL script to automatically follow your followers on Twitter

If you have a Twitter account, you will know there are friends follow you and you are not following them. To be nice to your fans, you’d better follow them back. If you have a large number fans added everyday, it will be hard to catch up. Now it is time to automate the [...]

Aug
18
2009

Generate entire site by PERL

I wrote a Windows application to generate entire site a while ago. It works fine in Windows OS. I am working on Linux more and more and love its cron job. That make me think that I can let computer automatically generate the entire site at given time without any human interfere. At the beginning [...]

Aug
17
2009

Use PERL to processing CSV file as plain text file

There are several modules used to process CSV file in PERL. Please refer to this tutorial to learn more about it. It describes several ways to parse CSV file, such as using Text::CSV module, Tie::CSV_File, Tie::Handle::CSV, and DBD::CSV modules. Here what I describe a very simple way to process CSV without using any modules.
Since CSV file [...]