Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to Teach Perl to Scholars in the Humanities

by johndageek (Hermit)
on Jan 30, 2004 at 21:03 UTC ( #325396=note: print w/ replies, xml ) Need Help??


in reply to How to Teach Perl to Scholars in the Humanities

Question, how do they search now?

Have them find particular text using their current method, then try one of the two below.

Of course perl needs to be on their box for the second one. But many people will gravitate toward something they are convinced is better/faster/easier than the way they are doing it now.

if they are using unix or cygwin try
grep -n text_to_search_for filename

#!/usr/bin/perl ## put your file name in below $your_file="file name goes here"; ## open in, "$your_file" or die "could not open $your_file\n"; ## loops through file while (<in>) { $line_count++; ## in the line below put the text to search for between the / and / print "$line_count - $_" if (/text to find/); }

Good luck, HTH!
dageek


Comment on Re: How to Teach Perl to Scholars in the Humanities
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://325396]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-07-22 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (113 votes), past polls