--- /dev/null
+http://wonder-tonic.com/peoplesighingontwitter/
+
+http://engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html
+
+http://factoryjoe.com/blog/2007/08/25/groups-for-twitter-or-a-proposal-for-twitter-tag-channels/
 
--- /dev/null
+#!/usr/bin/env perl
+
+#{
+#  'source' => '<a href="http://www.tweetdeck.com/" rel="nofollow">TweetDeck</a>',
+#  'to_user_id' => undef,
+#  'geo' => {
+#             'coordinates' => [
+#                                '52.8022',
+#                                '-2.1157'
+#                              ],
+#             'type' => 'Point'
+#           },
+#  'profile_image_url' => 'http://a3.twimg.com/profile_images/463672139/IMGP3235_2_small_normal.jpg',
+#  'from_user_id' => 32931811,
+#  'iso_language_code' => 'en',
+#  'created_at' => 'Wed, 21 Apr 2010 13:34:17 +0000',
+#  'text' => 'Slightly confused by @ElementalEurope using a mix of metric an imperial measurements on their website. Great kit though! Good deals too.',
+#  'metadata' => {
+#                  'result_type' => 'recent'
+#                },
+#  'id' => '12576462741',
+#  'from_user' => 'andystraw'
+#}
+
+use strict;
+use Net::Twitter;
+use CGI qw/:standard :html4/;
+use List::Util qw/shuffle/;
+use utf8;
+
+binmode(STDOUT, ":utf8");
+$CGI::DISABLE_UPLOADS = 1;
+ 
+# takes in (a hash reference from the results array, results counter)
+sub process_tweet {
+       my $parity = ($_[1] % 2) ? 1 : 2;
+       my $tweet = $_[0]->{text};
+       my $permalink = "http://twitter.com/$_[0]->{from_user}/status/$_[0]->{id}";
+
+       # url handling comes from perl cookbook recipe 20.4
+       $tweet =~ s{(http:\S+)}{<a href="$1" class="aa">$1</a>}gs;
+
+       # naive @'s
+       $tweet =~ s{@(\w+)}{@<a href="http://twitter.com/$1" class="aa">$1</a>}g;
+
+       # naive #'s
+       # http://stackoverflow.com/questions/2692510
+       $tweet =~ s{#([0-9A-Z_]*[A-Z_]+\w*)}
+               {<a href="http://twitter.com/search?q=%23$1" class="aa">#$1</a>}gi;
+
+       # hash_confused module for twitter text
+       if ($tweet =~ /(\@|#)confused/i) {
+               $tweet = a({href=>$permalink, -class=>"ab"}, $_[1])." $tweet";
+               $tweet = div({-class=>"tweet$parity"}, $tweet);
+       }
+       elsif ($tweet =~ /(www\.)*confused\.com/i) {
+               $tweet =~ s{((www\.)*confused\.com)}{<a href=\"$permalink\" class=\"ab\">$1</a>}i;
+               $tweet = div({-class=>"tweet$parity"}, "$_[1] $tweet");
+       }
+       elsif ($tweet =~ /confused[\s\-]*dot[\s\-]*com/i) {
+               $tweet =~ s{(confused[\s\-]*dot[\s\-]*com)}{<a href=\"$permalink\" class=\"ab\">$1</a>}i;
+               $tweet = div({-class=>"tweet$parity"}, "$_[1] $tweet");
+       }
+       else {
+               $tweet =~ s{(confused)}{<a href=\"$permalink\" class=\"ab\">$1</a>}ig;
+               $tweet = div({-class=>"tweet$parity"}, "$_[1] $tweet");
+       }
+
+}
+
+my $css_file = "hash_confused.css";
+#my $css_file = "http://localhost/hash_confused.css";
+
+my $nt = Net::Twitter->new(
+       traits => [qw/API::Search/],
+);
+
+my $search_term = "confused";
+my $results_per_page = 50;
+my $r = $nt->search({q=>$search_term, rpp=>$results_per_page});
+my @results_array = @{$r->{"results"}};
+@results_array = shuffle(@results_array);
+
+print
+       header(-charset=>'utf-8'),
+       start_html(-title=>"#confused",
+                               -meta=>{"keywords"=>"ivan monroy lópez, goofy"},
+                               -style=>{"src"=>$css_file});
+
+my $count = 1;
+foreach (@results_array) {
+       
+#      my $parity = ($count % 2) ? 1 : 2;
+       print &process_tweet($_, $count);
+
+
+       ++$count;
+}
+
+
+
+
+
+
+
+
+
+print end_html;
 
--- /dev/null
+#!/usr/bin/env perl
+
+use strict;
+use Net::Twitter;
+use Data::Dumper;
+
+my $nt = Net::Twitter->new(
+       traits => [qw/API::Search/],
+);
+
+my $search_term = "confused";
+my $r = $nt->search($search_term);
+
+print Dumper $r;
 
--- /dev/null
+#!/usr/bin/env perl
+
+use strict;
+use Net::Twitter;
+use Data::Dumper;
+use CGI qw/:standard :html4/;
+
+my $nt = Net::Twitter->new(
+       traits => [qw/API::REST/],
+);
+
+my $timelineref = $nt->public_timeline;
+my @timeline = @$timelineref;
+
+print
+       header,
+       start_html(
+                               -title=>"public timeline",
+                               -style=>{"code"=>"body{background-color: #c0deed}"},
+                       );
+
+foreach (@timeline) {
+       my %user = %{$_->{"user"}};
+       print
+               img({src => $user{"profile_image_url"}}),
+               img({src => $user{"profile_background_image_url"}}),
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+print end_html;
 
--- /dev/null
+#!/usr/bin/env perl
+
+use strict;
+use Net::Twitter;
+use Data::Dumper;
+
+my $nt = Net::Twitter->new(
+       traits => [qw/API::Search/],
+);
+
+my $search_term = "confused";
+my $r = $nt->search($search_term);
+
+print Dumper $r;
 
--- /dev/null
+#!/usr/bin/env perl
+
+use strict;
+use Net::Twitter;
+
+my $nt = Net::Twitter->new(
+       traits => [qw/API::Search/],
+);
+
+my $search_term = "confused";
+#my $search_term = "stupid";
+#my $search_term = "clueless";
+#my $search_term = "no tears";
+my $r = $nt->search($search_term);
+
+my @results_array = @{$r->{"results"}};
+
+# time string
+my @t = localtime;
+my $time_string = sprintf "%02d%02d%02d_%02d%02d%02d", $t[5] - 100, $t[4] + 1, $t[3], $t[2], $t[1], $t[0];
+
+my $filename = "texts/".$time_string.$search_term;
+if (!open HANDLE, ">$filename") {
+       die "can't open: $!";
+}
+
+foreach (@results_array) {
+       print HANDLE $_->{'text'}."\n";
+}
+
+close HANDLE;
 
--- /dev/null
+#!/usr/bin/env perl
+
+use strict;
+use Net::Twitter;
+use Scalar::Util 'blessed';
+
+my $user = "perl_tweet";
+my $password = "simple";
+my $tweet = shift;
+
+my $nt = Net::Twitter->new(
+    traits   => [qw/API::REST/],
+#decode_html_entities => 1,
+    username => $user,
+    password => $password
+);
+
+my $result = $nt->update($tweet);
 
--- /dev/null
+#!/usr/bin/env perl
+
+#{
+#  'source' => '<a href="http://www.tweetdeck.com/" rel="nofollow">TweetDeck</a>',
+#  'to_user_id' => undef,
+#  'geo' => {
+#             'coordinates' => [
+#                                '52.8022',
+#                                '-2.1157'
+#                              ],
+#             'type' => 'Point'
+#           },
+#  'profile_image_url' => 'http://a3.twimg.com/profile_images/463672139/IMGP3235_2_small_normal.jpg',
+#  'from_user_id' => 32931811,
+#  'iso_language_code' => 'en',
+#  'created_at' => 'Wed, 21 Apr 2010 13:34:17 +0000',
+#  'text' => 'Slightly confused by @ElementalEurope using a mix of metric an imperial measurements on their website. Great kit though! Good deals too.',
+#  'metadata' => {
+#                  'result_type' => 'recent'
+#                },
+#  'id' => '12576462741',
+#  'from_user' => 'andystraw'
+#}
+
+use strict;
+use CGI qw/:standard :html4/;
+use List::Util qw/shuffle/;
+use utf8;
+
+binmode(STDOUT, ":utf8");
+$CGI::DISABLE_UPLOADS = 1;
+
+my $results = [
+       # confused.com
+       {
+               'text' => 'RT @StefHall: My mum just said she was "confused-dot-com" about something... There are just no limits to her foreign coolness these days.',
+               'id' => '12708712137',
+               'from_user' => 'AlbertoJaber',
+       },
+       # confused.com
+       {
+               'text' => 'www.confused.com',
+               'id' => '11300424771',
+               'from_user' => 'Nicole_Herring',
+       },
+       # confused.com
+       {
+               'text' => '@SKWILLASDG I was confused.com for a minute! Lol cool',
+               'id' => '12859711229',
+               'from_user' => 'KatEyesTee',
+       },
+       # confused.com
+       {
+               'text' => '@Mayah_Riaz how do I list you. Confused dot com I\'m not very computer literate ;) Xx',
+               'id' => '12698529910',
+               'from_user' => 'katiemack12',
+       },
+       # do not extract an all-numeric hashtag
+       {
+               'text' => '@AFow rock? Bone? What??? Lol I\'m so confused! Also do u mean #1 Jonas? Joe? ; ) he\'s my #1 right now : )',
+               'id' => '11246320622',
+               'from_user' => 'natarias2007',
+       },
+       # bug in stackoverflow's first answer
+       {
+               'text' => 'My alarm went off this morning and my dream-self looked at it, confused, and said, "Didn\'t I wake up to you already?" #no #not enoughsleep',
+               'id' => '12874298805',
+               'from_user' => 'KateLeiter',
+       },
+       # bugs pointed out by stackoverflow
+       {
+               'text' => 'a#hash #$hash #12a #ab1 #0a1 #123 #abc1a #a0a confused abcdefg#hash #####hash',
+               'id' => '12999286356',
+               'from_user' => 'perl_tweet',
+       },
+       # unicode support for hashtags
+       {
+               'text' => 'criativo? diferente? só sei que achei #fantástico http://bit.ly/cpMYjh',
+               'id' => '12929483156',
+               'from_user' => 'chikinitus',
+       },
+];
+
+# takes in (a hash reference from the results array, results counter)
+sub process_tweet {
+       my $parity = ($_[1] % 2) ? 1 : 2;
+       my $tweet = $_[0]->{text};
+       my $permalink = "http://twitter.com/$_[0]->{from_user}/status/$_[0]->{id}";
+
+       # url handling comes from perl cookbook recipe 20.4
+       $tweet =~ s{(http:\S+)}{<a href="$1" class="aa">$1</a>}gs;
+
+       # naive @'s
+       $tweet =~ s{@(\w+)}{@<a href="http://twitter.com/$1" class="aa">$1</a>}g;
+
+       # naive #'s
+       # http://stackoverflow.com/questions/2692510
+       $tweet =~ s{#([0-9A-Z_]*[A-Z_]+\w*)}
+               {<a href="http://twitter.com/search?q=%23$1" class="aa">#$1</a>}gi;
+
+       # hash_confused module for twitter text
+       if ($tweet =~ /(\@|#)confused/i) {
+               $tweet = a({href=>$permalink, -class=>"ab"}, $_[1])." $tweet";
+               $tweet = div({-class=>"tweet$parity"}, $tweet);
+       }
+       elsif ($tweet =~ /(www\.)*confused\.com/i) {
+               $tweet =~ s{((www\.)*confused\.com)}{<a href=\"$permalink\" class=\"ab\">$1</a>}i;
+               $tweet = div({-class=>"tweet$parity"}, "$_[1] $tweet");
+       }
+       elsif ($tweet =~ /confused[\s\-]*dot[\s\-]*com/i) {
+               $tweet =~ s{(confused[\s\-]*dot[\s\-]*com)}{<a href=\"$permalink\" class=\"ab\">$1</a>}i;
+               $tweet = div({-class=>"tweet$parity"}, "$_[1] $tweet");
+       }
+       else {
+               $tweet =~ s{(confused)}{<a href=\"$permalink\" class=\"ab\">$1</a>}ig;
+               $tweet = div({-class=>"tweet$parity"}, "$_[1] $tweet");
+       }
+
+}
+ 
+
+#my $css_file = "hash_confused.css";
+my $css_file = "http://localhost/hash_confused.css";
+
+
+my @results_array = @{$results};
+@results_array = shuffle(@results_array);
+
+print
+       header(-charset=>'utf-8'),
+       start_html(-title=>"#confused",
+                               -meta=>{"keywords"=>"ivan monroy lópez, goofy"},
+                               -style=>{"src"=>$css_file});
+
+my $count = 1;
+foreach (@results_array) {
+       
+#      my $parity = ($count % 2) ? 1 : 2;
+       print &process_tweet($_, $count);
+
+
+       ++$count;
+}
+
+
+
+
+
+
+
+
+
+print end_html;