Write a program in PERL that for given text data file obtained from a GPS device calculates median height, median speed and total length of relocation. You must use a regular expression to filter valid data from an input file.
Run your program on data_fly.txt and data_bike.
Inspect the enclosed two data files in order to build a regular expression that would filter the desired variables from the given data files. (height is the number just before the string "ft", speed in the number just before the string "mph", partial distance is the numebr just before string "mi" or string "ft" - you must convert feets into miles before adding them up.) In order to calculate a median value of a variable all values from valid data lines should be stored in an array, the array shoul dbe sorted, and the value from the middle if it picked as median.
Attach all source code in files with proper names and extensions (*.html, *.java, *.pl, *.php, .htaccess e.t.c.). Do not ZIP files together or include compiled files (e.g. *.class). In case of Web pages (HTML), dynamic Web pages (HTML, JavaScript, CGI) or Java applets also send the complete URL (including http://) that points to a page on your Web site that demonstrates your homework. Send your homework via e- mail to the instructor at olekmali at cegt201.bradley.edu. Please set the message subject to: web-hwA.
Thank you.