LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-18-2011, 09:51 AM   #1
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Rep: Reputation: 3
How Do I Use Regex::PreSuf???


Hey All,

So I just recently downloaded Regex-PreSuf.

I believe it downloaded correctly, and also install correctly (did the following):
> downloaded it
> gzipped
> tar'ed
> perl Makefile.PL
> make
> make test
> make install


This is the file listing after the make install completed:
Code:
drwxr-xr-x 8 user users  4096 Jul 18 10:29 blib
-rwxr-xr-x 1 user users  4684 Feb 26  2006 ChangeLog
-rwxr-xr-x 1 user users 23071 Jul 18 10:29 Makefile
-rwxr-xr-x 1 user users   187 Jul 21  1998 Makefile.PL
-rwxr-xr-x 1 user users   170 Feb 26  2006 MANIFEST
-rwxr-xr-x 1 user users   298 Feb 26  2006 META.yml
-rwxr-xr-x 1 user users     0 Jul 18 10:29 pm_to_blib
-rwxr-xr-x 1 user users  7916 Feb 26  2006 PreSuf.pm
-rwxr-xr-x 1 user users   514 May 11  2000 README
drwx--x--x 2 user users  4096 Feb 26  2006 t

The output from the make, and make install gave the All OK, but there is no documentation with it that shows how to use it?

Does anyone know what you have to do to use it? From what I read, it is used to enter a string and it gives you the regex that matches that string exactly?

This is what I tried, from within the directory and its the output:
Code:
~/Downloads/Regex-PreSuf/Regex-PreSuf-1.17> ./PreSuf.pm Hello World
./PreSuf.pm: line 1: package: command not found
./PreSuf.pm: line 3: use: command not found
./PreSuf.pm: line 4: local: can only be used in a function
./PreSuf.pm: line 5: syntax error near unexpected token `('
./PreSuf.pm: line 5: `use vars qw($VERSION $DEBUG);'


Thanks in advance,
Matt
 
Old 07-18-2011, 01:32 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
There is a nice example here http://use.perl.org/~Phred/journal/27727

More examples can be found with Google .. Use Regex::PreSuf
http://www.google.com/webhp#hl=en&cp...w=1152&bih=715

You can of course not do ./PreSuf.pm : It's a text file.
And it is a module, that is meant to be used by another perl script.
( Some perl scripts that have #!/usr/bin/perl or similar in line 1,
can be run with 'perl <script>' ).

PreSuf.pm : http://search.cpan.org/~jhi/Regex-PreSuf-1.17/PreSuf.pm

..

Last edited by knudfl; 07-18-2011 at 01:35 PM.
 
Old 07-18-2011, 02:29 PM   #3
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
Oooh ok... Haha I thought it was a command line cmd.

Thanks, for the links i'll give them a shot.


Thanks,
Matt
 
Old 07-18-2011, 03:30 PM   #4
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
Hey thanks again for the links. just checked them out and it was perfect.

Thanks,
matt
 
Old 07-18-2011, 07:18 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Incidentally, you may find it easier (especially if dependencies are involved) to use the CPAN tool as root
Code:
perl -e shell -MCPAN
cpan> install Regex::PreSuf
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] differences between shell regex and php regex and perl regex and javascript and mysql golden_boy615 Linux - General 2 04-19-2011 01:10 AM
Perl to find regex and print following 5 lines after regex casperdaghost Linux - Newbie 3 08-29-2010 08:08 PM
I need a vi regex d3funct Linux - General 3 03-16-2009 09:26 AM
regex with sed to process file, need help on regex dwynter Linux - Newbie 5 08-31-2007 05:10 AM
Need a regex, I suck at regex's d3funct Programming 4 02-25-2002 08:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration