I am trying to split input that looks like
,2005-09-12 01:45:00.000000,2005-09-12 01:48:18.000000,
I want to split on the dot .
What I am using is ($ev_time,$rol)=split(/\./),$inputfile;
This does not recognize the dot as what I want to split on. (2 Replies)
hi
one perl issue i have xml file with 2 values and one condition b.w them
<rule>
<val1>12</val1>
<cond>and</cond>
<val2>13</val2>
</rule>
i read these values in hash in perl code
$one{val1} = 12
$one{cond} = and
$one{val2} = 13
now i want to form... (3 Replies)
Hi,
I got this script from the web, this generates an LDAP report in CSV format.
#!/usr/bin/perl
#
# Copyright (c) 2004
# Ali Onur Cinar &060;cinar&064;zdo.com&062;
#
# License:
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for... (23 Replies)
Hi
just for regular use i m working on small module written in perl for getting date in specified format like i have to specify date format and then seperator to seperate date i am 95% done. now i m sure explanation i gave is not good enough so i am putting output here :
C:\Documents and... (2 Replies)
Hello. I've been writing some code in Perl to read in strings from html files and have been having issues. In the html file, each "paragraph" is a certain file on the website. I need to find every one of the files that is a certain type, in this case, having green color....therefore... (7 Replies)
Hi Friends,
I have a variable which has a number (e.g. 12.1234). I want to remove "." (dot) from that number i.e. 121234
I want to do this using perl.
Can you please guide me
Thank you
Anushree (2 Replies)
Hi
I am teaching myself perl and am writing a socket application to get experience.
I am using Eclipse with the EPIC plugin to run the code in debug mode. I think that sometimes the script is not releasing the port if I terminate it in debug mode as I am occasionally getting the message: -
... (3 Replies)
Im storing multiple functions in a varaible called $check...
The variable check contains the following:
a()
b()
c()
...
..etc
now im checking individually which function is kept in which file using GREP
if ( grep \$check \i, <FILE> )
The problem is im getting the output for the... (1 Reply)
Hi,
I find it really strange while writing a simple regex to match and print the matched string,
dibyajyo@fwtest:~ #perl -e '$x = "root@rashmi>"; print "matched string:$1\n" if ($x =~ /(root@rashmi)/);'
matched string:root
dibyajyo@fwtest:~ #perl -e '$x = "root@rashmi>"; print... (1 Reply)
Hi,
I have a file in PERL in the following pattern
filename| 06-Dec-11 03.04.14.000000 PM
filename1| 06-Dec-11 05.05.14.000000 PM
I need to replace .(dot) with :(semicolon) in the timestamp value of the file
How can this be done. Any help will be appreciated
Thanks in advance (5 Replies)
Discussion started by: irudayaraj
5 Replies
LEARN ABOUT DEBIAN
path::dispatcher::rule::tokens
Path::Dispatcher::Rule::Tokens(3pm) User Contributed Perl Documentation Path::Dispatcher::Rule::Tokens(3pm)NAME
Path::Dispatcher::Rule::Tokens - predicate is a list of tokens
SYNOPSIS
my $rule = Path::Dispatcher::Rule::Tokens->new(
tokens => [ "comment", "show", qr/^d+$/ ],
delimiter => '/',
block => sub { display_comment(shift->pos(3)) },
);
$rule->match("/comment/show/25");
DESCRIPTION
Rules of this class use a list of tokens to match the path.
ATTRIBUTES
tokens
Each token can be a literal string, a regular expression, or a list of either (which are taken to mean alternations). For example, the
tokens:
[ 'ticket', [ 'show', 'display' ], [ qr/^d+$/, qr/^#w{3}/ ] ]
first matches "ticket". Then, the next token must be "show" or "display". The final token must be a number or a pound sign followed by
three word characters.
The results are the tokens in the original string, as they were matched. If you have three tokens, then "match->pos(1)" will be the
string's first token ("ticket"), "match->pos(2)" its second ("display"), and "match->pos(3)" its third ("#AAA").
Capture groups inside a regex token are completely ignored.
delimiter
A string that is used to tokenize the path. The delimiter must be a string because prefix matches use "join" on unmatched tokens to return
the leftover path. In the future this may be extended to support having a regex delimiter.
The default is a space, but if you're matching URLs you probably want to change this to a slash.
case_sensitive
Decide whether the rule matching is case sensitive. Default is 1, case sensitive matching.
perl v5.12.4 2011-08-30 Path::Dispatcher::Rule::Tokens(3pm)