Hi Frank,
On Wed, 25 Mar 2015 10:31:40 +0530
Frank Vino wrote:
> Hi Team,
>
> How to understand Regular Expression in a easy way?
>
This page has links to some recommended tutorials about learning regular
expressions:
http://perl-begin.org/topics/regular-expressions/
*NOTE*: I originated pe
Frank,
Just go through below site, it helps to build regex and test same easily.
http://www.regexr.com/
~Rahul
On Wed, Mar 25, 2015 at 10:42 AM, Akshay Mohit
wrote:
> Just start using it and you will find it very easy to understand.
>
> -Akshay
>
> On Wed, Mar 25, 2015 at 10:31 AM, Frank Vino
Just start using it and you will find it very easy to understand.
-Akshay
On Wed, Mar 25, 2015 at 10:31 AM, Frank Vino wrote:
> Hi Team,
>
> How to understand Regular Expression in a easy way?
>
> Thanks,
> Frank
>
Hi Team,
How to understand Regular Expression in a easy way?
Thanks,
Frank
> On Mar 24, 2015, at 7:27 AM, Anirban Adhikary
> wrote:
>
> Hi Jim
>
> In your code there is some hard coded value [ /RXMOI:MO=RXOTRX
> But I can't put any hard coded value since I use this code as a function and
> pass the filename as an argument.
> As you can see in my code there is no har
Hi Sherman,
On Tue, 24 Mar 2015 08:23:07 -0600
Sherman Willden wrote:
> Thank you, Shlomi. I am on Ubuntu when I try to install. I am looking at
> the links and I see there is also a DBD::msql. I will try that.
>
DBD::mSQL is part of https://metacpan.org/release/Msql-Mysql-modules (whose
last
Hi Jim
In your code there is some hard coded value [
* /RXMOI:MO=RXOTRX*
But I can't put any hard coded value since I use this code as a function
and pass the filename as an argument.
As you can see in my code there is no hard coded value.
Best Regards
Anirban.
On Tue, Mar 24, 2015 at 7:44 PM,
Thank you, Shlomi. I am on Ubuntu when I try to install. I am looking at
the links and I see there is also a DBD::msql. I will try that.
Sherman
On Tue, Mar 24, 2015 at 1:37 AM, Shlomi Fish wrote:
> Hi Sherman,
>
> On Mon, 23 Mar 2015 14:42:54 -0600
> Sherman Willden wrote:
>
> > I am trying t
Am 24.03.2015 um 14:03 schrieb Shlomi Fish:
> This can be more idiomatically written as:
>
> $a->[1] <=> $b->[1] or $a->[2] <=> $b->[2]
I agree, a
sort {
$a->[0] <=> $b->[0] or
$a->[1] <=> $b->[1] or
$a->[2] <=> $b->[2]
}
is certainly more readable than the C-style
sort {
> On Mar 24, 2015, at 3:42 AM, Anirban Adhikary
> wrote:
>
> Hi List
> I have a file like this.
> RXMOI:MO=RXOTRX-473-0,SC=0,DCP1=178,SIG=SCCONC,DCP2=179&&186,TEI=0;
> RXMOI:MO=RXOTRX-473-5,SC=0,DCP1=223,SIG=SCCONC,DCP2=224&&231,TEI=5;
> RXMOI:MO=RXOTRX-473-1,SC=0,DCP1=187,SIG=SCCONC,DCP2=188&&
Hi Simon,
thanks for helping Anirban, but I have a small comment about your code:
On Tue, 24 Mar 2015 13:11:56 +0100
Simon Reinhardt wrote:
> Hi Anirban,
>
> first we have to be clear how you want to sort the lines.
> Does 10-1 sort before 1-11 ?
> Do you want numeric (use <=>) or alphabetic (
Hi Anirban,
first we have to be clear how you want to sort the lines.
Does 10-1 sort before 1-11 ?
Do you want numeric (use <=>) or alphabetic (use cmp) order?
> while (my $line = <$RFH>) {
> chomp($line);
> if ($line =~ m/.*?\-(\d+)\-(\d+).*/) {
> $sequence_no = "
Hi Anirban,
In case if you print the complete data (the full line) then the following
approach may help.
Here is one way to do it
[code]
use strict;
use warnings;
my %data;
open my $fin, '<', 'data.txt' or die "Cannot open file ($!)";
while(<$fin>) {
chomp;
my($val) = split ',', $_; #s
Hi Anirban,
Here is one way to do it
[code]
use strict;
use warnings;
my @data;
open my $fin, '<', 'data.txt' or die "Cannot open file ($!)";
while(<$fin>) {
my($val) = split ',', $_; #split the data using comma
my($key, $value) = split '=', $val; #split the values using equal sign
(=)
Hi List
I have completed the code successfully. Please find the code below.
#!/usr/bin/perl
use strict;
use warnings;
my $file_name = "RXMOI_TRX_CMD";
open my $RFH, '<', $file_name;
my $sequence_no;
my %file_content_hash;
while (my $line = <$RFH>) {
chomp($line);
if ($line =~ m/.
Hi List
I have a file like this.
RXMOI:MO=RXOTRX-*473-0*,SC=0,DCP1=178,SIG=SCCONC,DCP2=179&&186,TEI=0;
RXMOI:MO=RXOTRX-*473-5*,SC=0,DCP1=223,SIG=SCCONC,DCP2=224&&231,TEI=5;
RXMOI:MO=RXOTRX-*473-1*,SC=0,DCP1=187,SIG=SCCONC,DCP2=188&&195,TEI=1;
RXMOI:MO=RXOTRX-*473-9*,SC=0,DCP1=259,SIG=SCCONC,DCP2=26
Hi Sherman,
On Mon, 23 Mar 2015 14:42:54 -0600
Sherman Willden wrote:
> I am trying to use perl with mysql. I have a tutorial open which prompted
> me to perform the following.
>
> $ sudo perl -MCPAN -e shell
> cpan> install DBI
> cpan[2]> install DBD::mysql
>
> DBI installed. The 'install DBD
17 matches
Mail list logo