Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

string::rewriteprefix(3) [osx man page]

String::RewritePrefix(3)				User Contributed Perl Documentation				  String::RewritePrefix(3)

NAME
String::RewritePrefix - rewrite strings based on a set of known prefixes VERSION
version 0.006 SYNOPSIS
use String::RewritePrefix; my @to_load = String::RewritePrefix->rewrite( { '' => 'MyApp::', '+' => '' }, qw(Plugin Mixin Addon +Corporate::Thinger), ); # now you have: qw(MyApp::Plugin MyApp::Mixin MyApp::Addon Corporate::Thinger) You can also import a rewrite routine: use String::RewritePrefix rewrite => { -as => 'rewrite_dt_prefix', prefixes => { '' => 'MyApp::', '+' => '' }, }; my @to_load = rewrite_dt_prefix( qw(Plugin Mixin Addon +Corporate::Thinger)); # now you have: qw(MyApp::Plugin MyApp::Mixin MyApp::Addon Corporate::Thinger) METHODS
rewrite String::RewritePrefix->rewrite(\%prefix, @strings); This rewrites all the given strings using the rules in %prefix. Its keys are known prefixes for which its values will be substituted. This is performed in longest-first order, and only one prefix will be rewritten. If the prefix value is a coderef, it will be executed with the remaining string as its only argument. The return value will be used as the prefix. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.16.2 2010-10-25 String::RewritePrefix(3)

Check Out this Related Man Page

String::RewritePrefix(3)				User Contributed Perl Documentation				  String::RewritePrefix(3)

NAME
String::RewritePrefix - rewrite strings based on a set of known prefixes VERSION
version 0.007 SYNOPSIS
use String::RewritePrefix; my @to_load = String::RewritePrefix->rewrite( { '' => 'MyApp::', '+' => '' }, qw(Plugin Mixin Addon +Corporate::Thinger), ); # now you have: qw(MyApp::Plugin MyApp::Mixin MyApp::Addon Corporate::Thinger) You can also import a rewrite routine: use String::RewritePrefix rewrite => { -as => 'rewrite_dt_prefix', prefixes => { '' => 'MyApp::', '+' => '' }, }; my @to_load = rewrite_dt_prefix( qw(Plugin Mixin Addon +Corporate::Thinger)); # now you have: qw(MyApp::Plugin MyApp::Mixin MyApp::Addon Corporate::Thinger) METHODS
rewrite String::RewritePrefix->rewrite(\%prefix, @strings); This rewrites all the given strings using the rules in %prefix. Its keys are known prefixes for which its values will be substituted. This is performed in longest-first order, and only one prefix will be rewritten. If the prefix value is a coderef, it will be executed with the remaining string as its only argument. The return value will be used as the prefix. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.18.2 2013-10-15 String::RewritePrefix(3)
Man Page

11 More Discussions You Might Find Interesting

1. Programming

String Comparison

Hi all, I have a file like this ibhib=ere wefwfl=werfe sfdes=wef From this file, i need to get the lefthand side string with respect to the corresponding righthand side string. i.e, I need to get the string "ere" with respect to "ibhib". But i am stuck with how to compare a string... (1 Reply)
Discussion started by: abey
1 Replies

2. Shell Programming and Scripting

How to rewrite a line in a file

Hi Can anyone tell me how can rewrite a line in a file by using line number? I tried to use sed by failed to do so. For example HELLO 179.390 111.560 HOW TO DO WHAT TO DO to become HELLO 200 3000 HOW TO DO WHAT TO DO (21 Replies)
Discussion started by: c0384
21 Replies

3. Shell Programming and Scripting

Tokenizing a String in unix

Hi All, I have String i want to tokenize based on one delimiter. Original String is -pComments.properties,-iPELF4 i want to tokenize the original string based on ',' (comma) as delimiter and collect them individually like string1=-pComments.properties string2=-iPELF4 ... (1 Reply)
Discussion started by: rajeshorpu
1 Replies

4. Shell Programming and Scripting

How to rewrite a existing value in a column inside a file?

I am having 4 field in a file name age date status i want to update or rewrite a value of status with another value how it can be done i used awk & sed but it shows result but not updating in original file help me out... Thanks (4 Replies)
Discussion started by: ragavendar
4 Replies

5. Shell Programming and Scripting

Date - String comparision

Hi, I am having difficulty to compare a string in a file against a date from a a table and print the latest date. Below are the values. String in File : 2009-12-02 00:37:51 Value Table : 2010-01-10-02.00.49.294758 I have to compare both the values ( Ignore the Microsecond in the table... (5 Replies)
Discussion started by: sam_78_nyc
5 Replies

6. Shell Programming and Scripting

String manipulation

Hi, I have the string like this ". Start : 06:53:11 - MON JUL 05, 2010" I need to print the part "06:53:11 - MON JUL 05, 2010" How i can do this? Thanks, Lenova (2 Replies)
Discussion started by: lenova2010
2 Replies

7. Shell Programming and Scripting

String manipulation

Hello Could you help with small script: How to split string X1 into 3 string String X1 can have 1 or many strings X1='A1:B1:C1:D1:A2:B2:C2:D2:A3:B3:C3:D3' This is output which I want to have: Z1='A1:B1:C1:D1' Z2='A2:B2:C2:D2' Z3='A3:B3:C3:D3' (5 Replies)
Discussion started by: vikus
5 Replies

8. UNIX for Advanced & Expert Users

[SOLVED] htaccess rewrite rule help!

hi there, I need that when user input mysite.com/ponuka/AAA2869 it shows mysite.com/ukaz.php?ponuka=AAA2869 because of facebook likes, and I found out that this is set up as rewrite rule in .htaccess file? how to achieve it? thank you... :confused: ---------- Post updated at 04:47... (0 Replies)
Discussion started by: vogueestylee
0 Replies

9. AIX

Sendmail on AIX adding header rewrite

Hi, I have been having issues with sendmail service on the AIX server recently with header rewrite on few random email generated from the scripts or programs. I'm not sure what is causing as rest of the emails from the sever is generating correctly? AIX Server --> GATEWAY SERVER(Serv2smtp)... (4 Replies)
Discussion started by: musu1982
4 Replies

10. Shell Programming and Scripting

Common prefix of a list of strings

Is there a simple way to find the longest common prefix of a space-separated list of strings, optionally by field? For example, given input: "aaa_b_cc aaa_b_cc_ddd aaa_b_cc aaa_b_cd"with no field separator, output: aaa_b_cwith _ field separator, output: aaa_bI have an awk solution which... (1 Reply)
Discussion started by: CarloM
1 Replies

11. Web Development

Mod_rewrite - URL rewrite based upon HTTP_REFERER

Hello, I have added following rewrite cond and rewrite rules but it does not work. RewriteCond %{HTTP_REFERER} ^http://192\.168\.1\.150/categories/.*$ RewriteRule ^(.*)$ http://www.blahblah.com/ When I hit url : http://192.168.1.150/categories/881-Goes?page=7 in my browser - it... (2 Replies)
Discussion started by: ashokvpp
2 Replies