I'm stuck again on something else now though. ^_^;
I have to add the values of an array @save that has numbers in it.
It's not done yet because I have to add all the intergers in the array. The challenge2.txt contains text and numbers that I had to split. The result has empty spaces in it.
I need to take each result from the loop and add the next result to it. And as stated before, I'm dense... My attempts at it haven't amounted to executable code.
Hi all,
I am trying to match a multi line string and return the matching string in one line. Here is the perl code that I wrote:
#!/usr/bin/perl
my $str='<title>My
title</title>';
if ($str =~ /(<title>)(+)(<\/title>)/ ){
print "$2\n";
}
It returns :
My
title
I want the... (3 Replies)
letz say that my file has 7 records with only one field. So my file has:
11111111
000000000000000
1111
aaaabbbccc
1111111222000000
aaaaaaaa
zz
All i need is:
1. when the field has a repetition of the same instance(a-z or 0-9), i would consideer it to be invalid.... (1 Reply)
I am trying to read a file and capture particular lines into different strings:
LENGTH: Some Content here
TEXT: Some Content Here
COMMENT: Some Content Here
I want to be able to get (LENGTH: .... ) into one array and so on... I'm trying to use PERL in slurp mode but for some reason... (8 Replies)
In Perl I can write a condition that evaluates a match expression like this:
if ($foo =~ /^bar/) {
do blah blah blah
}
How do I write this in shell? What I need to know is what operator do I use? The '=~' doesn't seem to fit. I've tried different operators, I browsed the man page for... (3 Replies)
Hi,
I am looking for a Perl regular expression to match the below pattern of a java script file.
var so = object.device.load('camera','value');
I want to grep out such lines present in the *.js files. The conditions are:
a) the line may start with blank space(s)
b) always the... (3 Replies)
Hello,
I am trying to use perl LWP module to read and get a specfic URL page. The issue is that the URL ends with the data and time and time is not consistent it changes all the time. if anyone could help me how to write a regular expressin that would work in the LWP::UserAgent get function to... (0 Replies)
Could you help me with this please. This regular expression seems to match for the wrong input
#!/usr/bin/perl
my $inputtext = "W1a$%XXX";
if($inputtext =~ m/+X+/)
{
print "matches\n";
}
The problem seems to be %. if inputtext is W1a$XXX, the regex doesnot match.... (5 Replies)
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
I had a string in perl script as below.
Tue Augáá7 03:54:12 2012
Now I need to replace the special character with space.
After removing the special chaacters
Tue Aug 7 03:54:12 2012
Could anyone please help me here for writing the regular expression?
Thanks in advance..
Regards,
GS (1 Reply)
Discussion started by: giridhar276
1 Replies
LEARN ABOUT DEBIAN
perl::prereqscanner::scanner::perl5
Perl::PrereqScanner::Scanner::Perl5(3pm) User Contributed Perl Documentation Perl::PrereqScanner::Scanner::Perl5(3pm)NAME
Perl::PrereqScanner::Scanner::Perl5 - scan for core Perl 5 language indicators of required modules
VERSION
version 1.012
DESCRIPTION
This scanner will look for the following indicators:
o plain lines beginning with "use" or "require" in your perl modules and scripts, including minimum perl version
o regular inheritance declared with the "base" and "parent" pragmata
Since Perl does not allow you to supply a version requirement with a "require" statement, the scanner will check the statement after the
"require Module" to see if it is "Module->VERSION( minimum_version );".
In order to provide a minimum version, that method call must meet the following requirements:
o it must be the very next statement after "require Module". Nothing can separate them but whitespace and comments (and one semicolon).
o "Module" must be a bareword, and match the "require" exactly.
o "minimum_version" must be a literal number, v-string, or single-quoted string. Double quotes are not allowed.
AUTHORS
o Jerome Quelin
o Ricardo Signes <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2009 by Jerome Quelin.
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.14.2 2012-06-27 Perl::PrereqScanner::Scanner::Perl5(3pm)