in reply to Print vs Say with sleep function

G'day raghuprasad241,

In addition to all the fine advice you've received, you can make print act like say by using the -l command switch.

Command line:

perl -le '...'

Shebang line:

#!/path/to/perl -l

See "perlrun: Command Switches" for details.

— Ken