I’ve two perl scripts, both of them wait for user to enter some input as below,
Does both of them are same ?
Does “STDIN” written in <> are just to for user-readability of code ?
If not please tell me the differences.
a) $in = <STDIN>;
b) $in = <>;
The form
<FILEHANDLE>will only read fromFILEHANDLE.The form
<>will read fromSTDINif@ARGVis empty; or from all the files whose names are still in@ARGVwhich contains the command line arguments passed to the program.