newbie syntax question -> and =>



Hi All,

I am a bit new (okay A LOT NEW) to Perl. My
background is mostly Modula2 and Bash script.

Looking over an example, I notices "->" and "=>"
being used. For example:

my($sock) = IO::Socket::INET->new(PeerAddr => $host,
PeerPort => 'exec(512)', Proto => 'tcp');
and
$sock->syswrite("0\0", 2);
$sock->syswrite($user . "\0", length($user) + 1);

What are they doing and what is are their rules?

Many thanks,
-T

.



Relevant Pages

  • Re: counting question.
    ... gnari wrote: ... > lets face it, not everyone is excited about Perl, for some reason. ... I am trying to learn perl. ... The bash script does the job and is ...
    (comp.lang.perl.misc)
  • Re: my doesnt totally isolate
    ... I want to associate a "pristine" state with an aggregate. ... > Okay. ... However while the 3rd edition of Programming Perl does say ... and printed documentation is bound to ...
    (comp.lang.perl.misc)
  • Re: Question on Bash Shell Script for Load Performance Monitoring
    ... below is both the perl script i wrote which creates the log, ... under that is the bash script that mails the contents of log to my ... customizable way to monitor custom daemon/processes such as these ... # OPEN AND ARRAY LOGFILE ...
    (comp.os.linux.misc)
  • Re: need to return exit code
    ... > But the bash script is not seeing my script's exit and is timming out ... echo "Call Perl Program"; ... will contain the exit status of the perl program. ...
    (perl.beginners)
  • Re: need to return exit code
    ... My perl script is called by a bash script, used in a compile / build env. ... echo "Call Perl Program"; ... will contain the exit status of the perl program. ...
    (perl.beginners)