This is the next one for differences in Use Vs Require that adds to my series of posts such as Differences IPv4 Vs IPv6, Differences Routing Vs Routed protocol, SMTP Vs ESMTP, Load Testing Vs Stress Testing and IMAP Vs POP3.
|Loads module at compile time||Loads module/libraries at runtime|
|Imports symbols/semantics from module only one time||Avoids redundant loading of ‘require’d files/symbols multiple times|
|Errors can be handled inside module itself.||Terminates program if there are errors in ‘require’d file or if file is not found.|
| Use Module; |
import Module ; }
|Does not require file extension to use file||Requires file extension (.pm) to ‘require’ file.|
If you are aware of any improvements to above differences or want to add to the above list then please post your comments below.
You may also be interested in,
+ Differences IPv4 Vs IPv6
+ Differences Routing Vs Routed protocol
+ HTML Vs HTML5