yes you can. this is an example :
#!perl -w use strict; use IO::Socket; if( @ARGV < 5 ) { print "\nUsage: b0t.pl [host] [port] [chan] [nick] [message]\n"; print "e.g. b0t.pl irc.epiknet.com 6667 b0tchan b0t hi\n"; exit; } my $line = ""; my $server = $ARGV[0]; my $port = $ARGV[1]; my $chan = "\#" . $ARGV[2]; my $nick = $ARGV[3]; my $command = $ARGV[4]; my $remote = IO::Socket::INET -> new ( Proto => "tcp", PeerAddr => $server , PeerPort => $port ); print "[~] Connection to " . $server . " on port " . $port . "\n"; unless( $remote ) { die " [-] Failure\n"; } print " [+] Success\n"; while( $line = <$remote> ) { if( $line =~ /(NOTICE AUTH).*(checking ident)/i ) { print $remote "NICK " . $nick . "\n"; print $remote "USER " . $nick . " " . $nick . " " . $nick . " +:" . $nick . "\n"; last; } } sleep( 1 ); print $remote "JOIN " . $chan . "\n"; while( $line = <$remote> ) { if ( $line =~ /^PING/ ) { print $remote "PONG :" . (split(/ :/, $line))[1] . "\n"; print $remote "JOIN " . $chan . "\n"; next; } if ( $line =~ /366/ ) { last; } } print "[+] Sending message\n"; print $remote "PRIVMSG " . $chan . " :" . $command . "\n"; print $remote "QUIT\n"; close $remote; print "[+] Quitting\n";

this is a specific example so i think you will not be able to cut some parts ... but it's an IRC bot !

Readmore tags added by davido per consideration.


In reply to Re: Perl and Robots by Isothop
in thread Perl and Robots by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.