All pastes #295547 Raw Edit

Something

public text v1 · immutable
#295547 ·published 2006-12-29 14:38 UTC
rendered paste body
#!/usr/bin/perl use warnings;use strict;use WWW::Mechanize;my $input_filename = shift;if (!defined($input_filename) || $input_filename eq "") {print << "Terminator";=============================P A S T E  B I N  D U M P E R=============================By NaxxtorUSAGE:	pastebin_dumper.pl filename.txtPURPOSE:	This script will dump a text file to pastebin.ca	and give you the ID back once it's done.  It requires	WWW::Mechanize.Terminatorexit}open(FILE, "< $input_filename");my @lines = <FILE>;my $content = join("\n",@lines);# print $content;my $agent = WWW::Mechanize->new();$agent->get("http://pastebin.ca/");$agent->form(2);$agent->field("content",$content);$agent->field("type","1");$agent->click();my $result = $agent->{content};if ($result =~ /pastebin.ca\/(\d+?)"/ ) {	print "Successfully submitted.  \n Your URL is http://pastebin.ca/$1";} else {	print "Result page didn't match\n";}