COP3344 Examples


Demo script to show reading from a script and some command line variables


Example script to process a csv file using a global variable for the file.

Same example script using a command line parameter.

Same example script using stdin to enter the file.

Same example script prompting the user for the file name.

Same example script using a command line parameter or stdin to enter the file.

Example script to display winner.

Some examples discussed in class:

while_read list_subdirs my_paste words_on_a_line_examples

Perl examples example1 example2 example3 example4 example5

count_words.pl example

count_words.awk example count_order_words.awk example

Perl/cgi examples getWinner getWinner1

Perl getWinner versus awk getWinner versus awk getWinner1 versus C getWinner