Perl functions references-recv Function - Perl Scripting

What is perl recv function?

Description

This function receives a message on SOCKET which attempts to read LENGTH bytes, placing the data read into variable SCALAR. The FLAGS argument takes the same values as the recvfrom( ) system function, on which the function is based. When you are communicating with sockets, this provides a more reliable method of reading fixed-length data than the sysread function or the line-based operator <FH>.

Syntax

Following is the simple syntax for this function −

Return Value

This function returns in Scalar Context: undef on error or Number of bytes read.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Perl Scripting Topics