Sorting in CGI

2003-09-06 Thread brady jacksan
Hi, I am writing a form that will list the name in the file namedata.dat in alphabetical order and display in a web page. #!/usr/bin/perl use strict; use CGI qw(:standard); my @namedata; whie (){ @namedata = split (/\|/,$_); if ($namedata[0] =~name_word){ print" Firstname:$namedata[1]",br()"la

using unpack

2003-09-06 Thread brady jacksan
Hi, I am trying to unpack a string "AABBCC" into three short values. $my_variables = unpack (s/, $var1 $var2 $var3). What is wrong with my command? - Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software

cgi help

2003-07-07 Thread brady jacksan
Hi, I am writing a form that will allow the user to find a record by first and last name and display the record in an HTML page. #!/usr/bin/perl use strict; use CGI qw(:standard); my @namedata; whie (){ @namedata = split (/\|/,$_); if ($namedata[0] =~name_word){ print" Firstname:$namedata[1]",

printing fields without the use of awk

2003-02-26 Thread brady jacksan
HI all,I am doing an assignment. I am writing a script to access a file and print the first and last name of  workers whose hours worked exceeded 300hours. In the file, the last name is the first field and the first name is the second field. Both fields are separated by the "|" operator.#!/usr/bin/

Printing fields in Perl without the use of AWK

2003-02-26 Thread brady jacksan
HI all, I am doing an assignment. I am writing a script to access a file and print the first and last name of workers whose hours worked exceeded 300hours. In the file, the last name is the first field and the first name is the second field. Both fields are separated by the "|" operator. #!/

Using alternatives and anchors

2003-02-17 Thread brady jacksan
I am writing a script that will read from a file named myfiles not stdin and print the lines containing the following words "everywhere" or 'nowhere. #!/usr/bin/perl #use strict while (<>) { chomp; if (/^everywhere$|^nowhere$/) print } How do I invoked the file myfiles at the begi

writing a script

2003-02-15 Thread brady jacksan
Hi I am writing a script that reads file from command line and places each line from the files into an array, and prints out the total lines read and then each line read. while (defined ($files = <>)) { chomp; print "Total lines in the files:@files\." print "@files\n" why do kee