Giving error 'Error Bad file descriptor' during execution of PERL : When I am using the following command for executing prop.obj
**"perl sendXssl.pl *hostname* *port* prop.obj"**, It is giving error as "Error Bad file descriptor".
Please help me to solve this.
My Perl program is given below...
#Perl#

    use IO::Socket::SSL qw( SSL_VERIFY_NONE );
    $|=1;
    
    $sock = new IO::Socket::SSL->new(
      PeerHost => $ARGV[0],
      PeerPort => $ARGV[1],
      SSL_verify_mode => SSL_VERIFY_NONE) or die "Error $!\n";
    
    print $sock "X";
    
    $file = $ARGV[2];
    open($fh,'+<',$file) or die "Error $!\n";
    {
      local $/;
      $data = <$fh>;
    }
    close($fh);
    
    $pack = $data;
    print $sock $pack;

I created **prop.obj** object from the following java file
#Java#

    import java.io.FileOutputStream;
        import java.io.ObjectOutputStream;
        import java.util.Properties;
        
        public class PropertiesX {
        
        	public static void main(String[] args) {
        		try {
        			String[] s = new String[1];
        			s[0] = "notepad.exe";
        			Properties p = new Properties();
        			p.put("commandArgs",s);
        			p.setProperty("parent", "c:\\windows\\system32\\notepad.exe");
        			FileOutputStream fos = new FileOutputStream("prop.obj");
        			ObjectOutputStream oos = new ObjectOutputStream(fos);
        			oos.writeObject(p);
        			oos.close();
        			System.out.println(p.toString());
        		} catch (Exception ex) {
        			ex.printStackTrace();
        		}
        	}
        }


