On 2022-10-10 18:12, Henrik Park wrote:
I know "/" is a special character for regex, which should be escaped.
But if I put "/" in a variable and use the variable in regex, then it
doesn't need the explicit escape. Like this one:
$ perl -le '$delimiter="/"; $str="hello/world/buddy";
@list=sp
On 2022-01-15 00:04, Jon Smart wrote:
Hello Paul
Do you mean by undef $/ and with <$fh> we can read the file into memory
at one time?
$/ is the input record separator, newline by default.
If undefined that means that the whole file is treated as one single record.
Yes that would be faster
On 2020-10-03 5:41 a.m., stefano cerbioni wrote:
hi guys i try to read a memory mapped file created with c++ , this is a c++
code that i have
[code]
[snip code]
[/code]
how can read a memory mapped created ?
thankz at all
A memory mapped file should be just like any other file. Just fi
On 2019-10-29 7:48 p.m., 刘东 wrote:
Dear every one:
Hello.
I try to write a perl script to delet the content of file carp01_1_both.txt as
same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new
file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file
carp
On 2019-10-25 3:23 a.m., Maggie Q Roth wrote:
Hello
Hello.
There are two primary types of lines in the log:
What are those two types? How do you define them?
60.191.38.xx/
42.120.161.xx /archives/1005
From my point of view those two lines have two fields, the first loo
On 2019-10-09 7:21 p.m., 刘东 wrote:
hellow:
I have written a script, but it does not work, can you tell me what wrong with
me?
#! /usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
my ($dir, $files, $file_name, $file_format, $file_dir, $file_main);
GetOptions ('dr=s' =>\$dir);
open
On 2019-10-09 7:21 p.m., 刘东 wrote:
hellow:
I have written a script, but it does not work, can you tell me what wrong with
me?
#! /usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
my ($dir, $files, $file_name, $file_format, $file_dir, $file_main);
GetOptions ('dr=s' =>\$dir);
open
On 2019-09-08 12:20 p.m., Jorge Almeida wrote:
On Sun, Sep 8, 2019 at 8:08 PM John W. Krahn wrote:
On 2019-09-07 1:25 p.m., Jorge Almeida wrote:
On Unix/Linux a character in a file name can be any character except a
slash '/' character because that is used to separate path elem
On 2019-09-07 1:25 p.m., Jorge Almeida wrote:
Sorry about the title, it's the best I can do...
#!/usr/bin/perl
use strict;
use warnings;
my $num=12;
my $target=pack('n', $num);
symlink($target, "foo") || die $!;
It dies with "No such file or directory"
No symlink is created. What I want is a sy
On 2018-11-22 8:08 a.m., David Precious wrote:
You'll often see these operators used to provide default values.
e.g.
sub hello {
my $name = shift;
$name ||= 'Anonymous Person';
Which is usually written as:
sub hello {
my $name = shift || 'Anonymous Person';
I
On 2018-11-21 3:08 a.m., Amanda Paziuk wrote:
I'm hoping someone can assist as I'm having difficulty with parsing a
section of the following configuration:
This is the code I have:
push @list, $datum; # should only contain '1', and '3'
>
> ...
>
foreach my $i (@list){ # loops t
On Thu, 2018-07-12 at 19:35 +0800, Lauren C. wrote:
>
> My web is powered by Apache and PHP,its access log seems as blow,
>
> xx.xx.xx.xx - - [12/Jul/2018:19:29:43 +0800] "GET
> /2018/07/06/antique-internet/ HTTP/1.1" 200 5489 "https://miscnote.ne
> t/"
> "Mozilla/5.0 (Macintosh; Intel Mac OS X
On Wed, 2018-06-13 at 21:21 -0500, Martin McCormick wrote:
> I wrote a small perl program to more quickly read all the
> subjects in an email list. One of the things the script does is
> to remove the mailing list name which repeats for every message
> and consists of a [, some English text and fi
On Tue, 2017-05-16 at 14:01 +0800, derr...@thecopes.me wrote:
I am working on problem #8 of the euler project. see below.
>
>
>
> The four adjacent digits in the 1000-digit number that have the
> greatest product are 9 × 9 × 8 × 9 = 5832.
>
> 73167176531330624919225119674426574742355349194934
On Thu, 2018-04-12 at 17:26 +0100, Gary Stainburn wrote:
> I have a text file (created by pdftotext) that I've imported into my
> script.
>
> It contains ASCII characters 251 for crosses and 252 for ticks.
ASCII defines 128 characters so those characters are not ASCII.
John
--
To unsubscribe
On Sat, 2018-03-10 at 00:14 +0100, hw wrote:
>
> Not really, the words I get from the ReadLine functions are not
> organized in an array.
>
> I´ve come up with this function to compute the "depth" of a word:
>
>
> sub get_depth {
> my $string = shift;
>
> $string =~ s/\s/ /g;
> $string =
On Wed, 2017-12-13 at 11:28 +, Mike Martin wrote:
> Hi
> I have the following code
>
> use strict;
> use File::Find;
> my @vsbe;
> my $top='P:\PT-6\PT-60\PT-603\Shared\Data Store\Files Dump Folder';
> my $max_depth=9;
> my $cnt1=0;
>
> find({wanted=>\&wanted1,preprocess=>\&preprocess1},$top)
On Wed, 2017-12-06 at 21:53 -0600, Martin McCormick wrote:
> A perl program needs to send binary data to an external device
> such that 0xff looks like
$ perl -le'my $x = sprintf q/%b/, 0xff; print $x'
> I have a line in the program as follows:
>
> my $txstart = pack("
On Sun, 2017-11-05 at 00:43 +, Dong Liu wrote:
> I try used perl script to get characters from data:
>
> #!/usr/bin/perl -w
> use v5.14;
> while (){
> chomp;
> my $line = '';
> $line = (split //,@_)[5];
At no point in your script do you or perl assign a value to the array
@_ so th
On Sun, 2017-07-02 at 11:16 -0400, Shawn H Corey wrote:
> On Sun, 2 Jul 2017 14:29:25 +0200
> Eric de Hont wrote:
>
> > What it boils down to: use warnings as well as -w works, but -w is
> > considered old fashioned.
>
> The problem with -w is that it can't be turned off.
$ perl -le'
use warni
SSC_perl wrote:
Again, let us know what you think! Your feedback, as always, is
appreciated.
Regards,
Frank Jance
Hello Frank,
It looks like you still have some of the same problems I pointed out
last year in November.
To begin, these files do not have a terminating newline, so th
Peter Holsberg wrote:
I think I've isolated the section that is not doing what I want.
open (FHIN, "$recapfile") or die $!;
That would be better as:
open my $FHIN, '<', $recapfile or die "Cannot open '$recapfile' because:
$!";
my $indexb; ## for the recapfile array
my $ofile;
You never
shawn wilson wrote:
Oh, I guess I was thinking that using the file name repeats the stat
(which it does). Since I was complaining about the ugliness of '_'.
However, you're right - that works as well as (-f _)<-- that doesn't
look weird as shit? I've got issues moving my fingers into typing
that
Shaji Kalidasan wrote:
You can use more than one file test on the same file to create a
complex logical condition.
Suppose you only want to operate on files that are both readable and
writable; you check each attribute and combine them with and:
if (-r $file and -w $file) {
...
}
Each time
Parysatis Sachs wrote:
Hi everyone!
Hello,
I'm new to this mailing list as well as to programming and Perl in general.
So there is a chance I might ask relatively stupid questions with very
obvious answers... Please bear with me!
So, here it goes:
I have a very long string with lots of Ns
SSC_perl wrote:
Hi John,
Hello,
Thanks for getting back to me with your findings. I really
appreciate it. I've gone through everything, made the changes that I
could, and I have some questions to some of your remarks.
You are using the value from readdir() without prepending the
Angela Barone wrote:
Hello,
Hello,
Could someone explain the format of the following line and how to read
it?
$name = $fieldname =~ /\[(.*?)\]/ ? $main::global->{'form'}->{$1} : $out;
Do the contents of $fieldname match the pattern /\[(.*?)\]/? If they do
then assign $main::g
SSC_perl wrote:
Hello,
Hello,
This is a one-time post to announce that the SurfShopPRO Perl
shopping cart system is going open source. Our site hasn't been fully
updated yet, but you can download the cart and check it our for
yourself. We are looking for developers, designers, and
Jim Gibson wrote:
On Oct 25, 2013, at 4:46 PM, Shaji Kalidasan wrote:
Dear Perlers,
I am trying to print the matching lines using __DATA__ filehandle and
for the very first time it prints the desired lines, but as soon as I
rewind it using seek, it is printing lines from the very beginning
w
Ronald F. Guilmette wrote:
In message<5268663c.4040...@stemsystems.com>,
Uri Guttmanwrote:
i think a blank line with . will end input to smtp servers. try that too
in the line after the from field.
DING DING DING!!!
Give that man a cupie doll, because he's the winner of today's
perplexing pu
Rick T wrote:
The code below (server addresses Xed out for security) has been used
on my website for years, but it does seem to misbehave on rare
occasions, so I have a few questions on how I might improve it. I
apologize in advance for my amateurish coding; I’m a high school
teacher who cannot
Harry Putnam wrote:
"John W. Krahn" writes:
First, thanks for the input.
[...]
my $exe = 33261;
Or:
my $exe = 0100755;
Where does that come from? And it appears some kind of conversion
must take place. If you print $exe right after assigning it 0100755,
it still s
Harry Putnam wrote:
Why is this script showing uninitialized variable warnings?
- -----=----- -
#!/usr/local/bin/perl
use strict;
use warnings;
use File::Find;
my $exe = 33261;
Or:
my $exe = 0100755;
my $eperm;
You don't really need this variable at file
Shawn H Corey wrote:
On Wed, 02 Oct 2013 13:57:36 -0400
Peter Holsberg wrote:
I was so upset that I deleted it all! It seems to me that
it should be fairly straightforward, but at 79, the old synapses
aren't firing quite as well as they used to.
Can you get me started?
Sure:
my @files =
Peter Holsberg wrote:
Let me start over.
The file I want to modify has a 6-digit filename and an extension htm.
For example, 131002.htm
I'm working in Windows, with Strawberry perl, with Randall L. Schwartz's
Randal L. Schwartz
John
--
Any intelligent fool can make things bigger and
more
Shawn H Corey wrote:
On Sun, 15 Sep 2013 13:00:36 -0700
Unknown User wrote:
If my perl script has a sleep for say 300 seconds, when the sleep is
being run is there any way i can find the time remaining in the sleep
say by sending a signal?
Thanks,
Not directly. You have to record the time b
Hans Ginzel wrote:
Hello!
Hello,
Is there a shorter way to write $a = ! $a, please?
Something analogous to ++ and -- operators like $a !! or !! $a would negate
the variable $a and return its previous or new value respectively.
You can do that if you use a reference to a scalar like this:
David Christensen wrote:
September 10, 2013 06:15 Hans Ginzel wrote:
> Is there a shorter way to write $a = ! $a, please?
> Something analogous to ++ and -- operators like $a !! or !! $a would
> negate the variable $a and return its previous or new value
> respectively.
I don't believe Perl
Hans Ginzel wrote:
Hello!
Hello,
Is there a shorter way to write $a = ! $a, please?
No.
John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction. -- Albert Einstein
--
To
Matt wrote:
I have this:
while () {
chomp;
next if /^#/;
# do stuff
}
It skips to the next item in the while loop of the string begins with
# and works fine. I would also like to skip to the next item in the
loop if the string contains anything other then lowercase,
unders
Rob Dixon wrote:
On 27/08/2013 23:06, John W. Krahn wrote:
my %logs = (
'one.log' => undef,
'two.log' => undef,
);
for my $name ( keys %logs ) {
open my $FH, '>>', $name or die "Cannot open '$name' because: $!";
$logs{ $na
Harry Putnam wrote:
I happen to be scripting something that needs to have two logs written
to and was sort of taken by how awkward this construction looked:
(Simplified for discussion, from a longer script)
my $rsync = 'rsync';
my $tmplog = 'one.log';
my $tmplog2 = 'two.log';
open(
Dr.Ruud wrote:
On 12/07/2013 13:44, Agnello George wrote:
hi
i have raw data that is like this in a flat file .
start
name:agnello
dob:2 april
address:123 street
end
start
name:babit
dob:13 april
address:3 street
end
start
name:ganesh
dob:1 april
address:23 street
end
i need to get the data
Agnello George wrote:
hi
Hello,
i have raw data that is like this in a flat file .
start
name:agnello
dob:2 april
address:123 street
end
start
name:babit
dob:13 april
address:3 street
end
start
name:ganesh
dob:1 april
address:23 street
end
i need to get the data in the following format
na
jitendra B wrote:
Hi All,
Hello,
Can you please let me know the following snippset? why it is used for?
select( STDERR );
Select STDERR as the default filehandle.
$| = 1;
Turn on autoflush for the current default filehandle.
(Redundant because STDERR autoflushes by default.)
selec
Brandon McCaig wrote:
On Fri, Jun 21, 2013 at 02:15:39PM +0100, Gary Stainburn wrote:
What your code did was to tag the "\n" onto the end of the
array then pass the whole thing to join.
Gary is basically correct, but he worded it wrongly. When Perl
calls subroutines it basically flattens argum
Brandon McCaig wrote:
On Sun, Jun 23, 2013 at 12:02:38PM +0300, Shlomi Fish wrote:
"last" is not a function (a.k.a "subroutine") - it cannot be.
It is a special statement which is handled in a special way by
the Perl interpreter. "redo" and "next" are not functions
either for a similar reason.
Dr.Ruud wrote:
On 24/06/2013 07:36, lee wrote:
It would be like:
if ( $color eq "blue" ) {
print "test\n";
last;
}
Alternative:
print( "test\n" ), last
if $color eq "blue";
I also see:
print( "test\n" ) and last
if $color eq "blue";
but always question that, because: what if print() fai
Marc Perry wrote:
Hi,
Hello,
I routinely generate rows of tab-separated data like this;
my @array = ( "boris", "natasha", "rocky", "bullwinkle");
print join "\t", @array, "\n";
However this code inserts an extra tab between bullwinkle and the newline
character.
So when it is important I do
Jim Gibson wrote:
On Jun 13, 2013, at 10:51 AM, lee wrote:
+ Is "print" and "printf" pretty much the same thing implementation
wise? I'm wondering if "printf" might involve more overhead so it
might be less efficient, depending on what you're doing.
They are pretty much the same. print
Brandon McCaig wrote:
On Thu, Mar 07, 2013 at 10:21:40AM +0100, WFB wrote:
Hi, List,
Hello,
To test our software I use perl to start it several times. My
perl script gather some information and start then the program
with different parameters.
It works very well, but I have a problem with t
Chris Stinemetz wrote:
Thanks in advance.
I have a subroutine inside another subroutine in a module I am tyring to
put together.
I would like to pass the value assigned to $srt in the while loop as the
parameter for the session_attempts subroutine called withing the
processPegs subroutine.
The
Tiago Hori wrote:
Hey Guys,
Hello,
I am still at the same place. I am writing these little pieces of code to
try to learn the language better, so any advice would be useful. I am again
parsing through tab delimited files and now trying to find fish from on id
(in these case families AS5 and
Kevin Walzer wrote:
I'm an experienced developer in several other languages (Python, Tcl,
AppleScript, JavaScript, C/Objective C), so I'm quite familiar with
structuring a program--but as I work on learning Perl, I find it
somewhat obscure, if not downright obfuscated. None of the other
language
Chris Stinemetz wrote:
I would like to only work with the data that has a line with |68| in it
print that line and then print each subsequent lines in that match
/\|7\|\d+\|\d+/ until #END is reached and then repeat for the rest of the
input data.
Below is what I have attempted.
Thanks in adva
Bill Stephenson wrote:
When converting DMYHMS to Epoch Seconds and back I get cheated out of a day.
Why?
Bill
--
#!/usr/bin/perl
use strict;
use warnings;
use Time::Local;
my ($time, $month, $day, $year, $seconds, $minutes, $hours, $wday, $yday,
$isdst);
my $start_date = '11/30/2012';
pr
punit jain wrote:
Hi,
Hello,
I have a requirement where I have directory structure like : -
test --> test/user1/files/, test/user2/files/, test/user3/files/ etc.
under sub-directories with usernames I have file with name usersettings.
So the final structure as : -
test / user1 / usersett
Hamann, T.D. wrote:
Hello,
Hello,
Given a string:
i994
where I want to replace the 'i' by a '1' the following regex
succesfully replaces the letter by a number:
s/(i)(\d\d\d)/1$2/;
tr/i/1/;
However, given a string:
i99o
where I want to replace the 'i' by a '1' and the 'o' by a '0'
*Shaji Kalidasan* wrote:
Neeraj,
If you print an array inside double quotes, each item of the array is
separated by the value specified in Perl special variable $" which is
the Output list separator. (interpolated lists)
It is just the _List Separator_ , it has nothing to do with output.
Jo
Neeraj wrote:
Hi,
I am new to Perl and perplexed with output of printing entire Array vs
printing each element
+4 ## check Array vis-a-vis List
+5
+6 @arr = qw;
+7 print "my array is : @arr \n";
+8
+9 ## lets print in a loop
+10 my $i = 0;
+11 while (
Danny Gratzer wrote:
Shouldn't that *.** be *.*? *to avoid having it consume everything?
It is not clear exactly which *.** you are referring to however a
non-greedy match does not necessarily consume less than a greedy match.
John
--
Any intelligent fool can make things bigger and
more c
jet speed wrote:
I have a file with similar data, around 10,000 entries with similar format.
i need to extract the output in below format. I can match the WWN and push
into an arrray, however i am not sure how to reference the WWN to its
corresponding device displayDevNum as in the below form
Danny Gratzer wrote:
I'm looking at comp.lang.perl and it doesn't seem like it's had new posts
in well, years. Is it dead?
It died in 1995.
If so are there any other good perl groups you'd recommend?
comp.lang.perl.misc
John
--
Any intelligent fool can make things bigger and
more comple
jmrhide-p...@yahoo.com wrote:
Hi, and thanks for volunteering to help!
I installed the following script last year and it seemed to be working fine.
Yesterday, however, my hosting service took down my site because the script was
tying up so much of their server resources that it was a threat to
Shlomi Fish wrote:
thanks for your answer. See below for my response.
On Wed, 5 Sep 2012 09:54:11 -0400
Shawn H Corey wrote:
On Wed, 5 Sep 2012 14:33:13 +0100
jet speed wrote:
i have an regx question. i have the array contents, now i want to
remove the first 2 characters (fc) of each elem
Shlomi Fish wrote:
Replying to myself, I have a correction which Shawn inspired.
On Wed, 5 Sep 2012 16:49:42 +0300
Shlomi Fish wrote:
On Wed, 5 Sep 2012 14:33:13 +0100
jet speed wrote:
i have an regx question. i have the array contents, now i want to
remove the first 2 characters (fc) of e
Shlomi Fish wrote:
On Wed, 5 Sep 2012 14:33:13 +0100
jet speed wrote:
i have an regx question. i have the array contents, now i want to
remove the first 2 characters (fc) of each element in the array and
store it in a second array ex: @array2
@array ="fc20/1, fc30/22, fc40/3, fc20/1";
outpu
timothy adigun wrote:
On 8/29/12, John W. Krahn wrote:
timothy adigun wrote:
On 8/29/12, timothy adigun<2teezp...@gmail.com> wrote:
for(my $i=0; $i<= length(@startSite)-1; $i++) {
The above could be:
for(my $i=0; $i<= scalar (@startSite); $i++) {
...
timothy adigun wrote:
Hi,
Hello,
On 8/29/12, timothy adigun<2teezp...@gmail.com> wrote:
for(my $i=0; $i<= length(@startSite)-1; $i++) {
The above could be:
for(my $i=0; $i<= scalar (@startSite); $i++) {
...
for(my $i=0; $i<= scalar (@startSite); $i++) { ## Oops
for(my
lina wrote:
Thanks Jim and John.
btw, what does the fileno mean? mean file-not-open?
It means file number. For example, STDIN is file number 0, STDOUT is
file number 1, STDERR is file number 2 and the next file opened is file
number 3, etc.
John
--
Any intelligent fool can make things bi
lina wrote:
Hi,
Hello,
I don't know which is the best way to "check whether this file is open
or not,"
Here it what I came out so far,
#!/usr/bin/env perl
use strict;
use warnings;
use autodie qw(open close);
use 5.012;
my $fn = "new_30.pdb";
open my $fh, '<', $fn;
my $ofh;
while(my $
Wang, Li wrote:
Dear All
Hello,
Thanks very much for your help!
I tried the script with my real data and found out that the situation gets more
complicate.
The following is part of my data:
scaffold_1_13528T/T C/T T/T C/T T/T C/T T/T
T/T N/N T/T
Wang, Li wrote:
Dear All
Hello,
I have an array of a series of strinngs. I want to set up a
condition in which all the scalers in the array are not the same.
For example
AB AB AB AB AB (delete the array)
AB AC AB AB AB (Keep the array)
AB AC AD AB AB (keep)
$ perl -le'
for ( [ "AB", "AB",
Chris Stinemetz wrote:
Hello List,
Hello,
I'm trying to grep an array of arrays, but I am getting the following error:
Can't use string ("1") as an ARRAY ref while "strict refs" in use at
form.pl line 121,<$COORDS> line 1281.
Press any key to continue . . .
Below is the grep statement:
jet speed wrote:
Hi All,
Hello,
Is there a way to find matching array elements from hash.
ex:
@names = ( abc. def. ghi, jky; );
%stud = (
" abc" =>" 34",
"nba" =>"99",
"def" =>"24",
"ghi"=> "33");
How can i go throught each elements of has %stud and print the matching
array value in th
Paul Anderson wrote:
[ snip ]
#!/usr/bin/myperl -w
# euler8.pl --- Euler Problem 8
# Author: Paul Anderson
# Created: 14 Aug 2012
# Version: 0.01
use warnings;
use diagnostics;
use 5.16.0;
#use strict;
no strict;
# The number.
$numb="7316717653133062491922511967442657474235534919493496983
Paul.G wrote:
The example below is just a test, I need to be able to insert multiple values
into a command, those values can be either 1, 2 or upto 5.
Below is closer to the working example, but I will read that document and to
help make a final decision.
# Check Free PV's
operation_CHECKFREE
Paul.G wrote:
Below is an extract from the perl script, the switch/case statement seemed like
a simple solution.
# Mail Program #
operation_CHECKFREEPVS();
print "$numPV \n";
# print "$FreePV[1] $FreePV[0] $numPV\n";
if ($numPV ne 0 ) {
punit jain wrote:
Hi,
Hello,
I am facing an issue. Below is code snippet : -
my $pm = new Parallel::ForkManager(10);
my $count=0;
foreach my $user (@users) {
$pm->start($user) and next;
my $result;
--- do some processing ---
Jack Vo wrote:
Hi all,
Hello,
I need to compress many files in a directory on server. I use "awk" and
"zip" command to compress these files.
By "awk" command, I filter theses file :
*# ls -latr | grep iMAP.med0 | awk '{print $9}'*
You are doing way too much just to get the correct file na
Michael Brader wrote:
On 07/16/2012 04:05 PM, De-Jian Zhao wrote:
I want to change the record separator in a Perl one liner with ">" as
the separator. However, I tried without success.
The perlrun document
(http://perldoc.perl.org/perlrun.html#Command-Switches) says that*
"***-0*[/octal/hexade
timothy adigun wrote:
[snip]
my %new_hash = ();
foreach my $data1 ( keys %$hash1 ) {
while ( my ( $key, $value ) = each %$hash2 ) {
my ($new_value) = keys %$value;
$new_hash{$key} = $new_value if $data1 == $key;
}
}
No need for the nested llops:
my %new_hash;
for
lina wrote:
On Thu, Jun 28, 2012 at 4:44 PM, John W. Krahn wrote:
lina wrote:
I have some data like:
0.35 3.41 1
0.35 4.24 1
0.35 4.35 2
0.36 0.36 1
0.36 1.32 1
0.36 1.45 1
0.36 1.46 1
wish the output look like
0.36 1.32 1.45 1.46 3.41 4.24 4.35
0.35 0 0 0 0
lina wrote:
Hi,
Hello,
I have some data like:
0.35 3.41 1
0.35 4.24 1
0.35 4.35 2
0.36 0.36 1
0.36 1.32 1
0.36 1.45 1
0.36 1.46 1
wish the output look like
0.36 1.32 1.45 1.46 3.41 4.24 4.35
0.35 0 0 0 0 11 2
0.36 1 1 1 1 0
Wang, Li wrote:
Dear list members
Hello,
I am a very beginner of perl programming.
Welcome to the Perl beginners mailing list.
I am trying to write a script to search all scalers of one array
(geneIDFile) in another file (annotationFile). If it is found and
matched, output the whole lin
Grant wrote:
Can anyone show me how to save to a variable the contents of a set of
double-quotes in a string? The string could look like any of these:
phrase1 "phrase2" phrase3
"phrase2" phrase3
phrase1 phrase3 phrase4
In all of these examples, phrase2 would be saved to the variable.
Many than
venkates wrote:
Hi all,
Hello,
I am trying to filter files from a directory (code provided below) by
comparing the contents of each file with a hash ref (a parsed id map
file provided as an argument). The code is working however, is extremely
slow. The .csv files (81 files) that I am reading
jmrhide-p...@yahoo.com wrote:
Hello and thanks for volunteering your time!
Hello. (And it's Perl, not PERL. :-)
I'm returning to PERL after about a year and am struggling to remaster some
syntax:
#!/usr/local/bin/perl
use warnings;
use strict;
use diagnostics;
# Converts current direct
Chris Stinemetz wrote:
Why does this short program only seem to capture the last line of
input in the @array, but when I put the for loop inside the while loop
all lines of input are available in @array.
I thought by declaring the @array outside the while loop would make
all of its contents avai
[ Please do not top-post your replies. Please remove non-relevant text
from your reply before posting. TIA ]
Jack Maney wrote:
ProTip:
The top two results from Google state:
PROTIP | Know Your Meme
About PROTIP is a term often used in forums and comments to preface snarky,
obvious, count
Shlomi Fish wrote:
On Mon, 04 Jun 2012 14:19:27 -0700
"John W. Krahn" wrote:
Chris Stinemetz wrote:
I have a subroutine that I want to "return 1" only if the value of
%{$href->{$_[0]}} is equal to 'ND' for the whole 24 occurences.
One way to do it:
sub
Chris Stinemetz wrote:
I have a subroutine that I want to "return 1" only if the value of
%{$href->{$_[0]}} is equal to 'ND' for the whole 24 occurences.
One way to do it:
sub site_offAir {
return values %{ $href->{ $_[ 0 ] } } == grep( $_ eq 'ND', values
%{ $href->{ $_[ 0 ] } } ) ? 1 :
nathalie wrote:
Hi
Hello,
I have this format of file: (see attached example)
1 3206102-3207048 3411782-3411981 3660632-3661428
2 4481796-4482748 4483180-4483486
and I would like to change it to this
1 3206102-3207048
1 3411782-3411981
1 3660632-3661428
2 4481796-4482748
2 4483180-4483486
Chris Nehren wrote:
On Wed, May 30, 2012 at 16:22:29 -0500 , Matt wrote:
I did this. Snippet from larger code:
eval {
$rststr = "";
local $SIG{ALRM} = sub { die "get timeout" };
alarm(30);
$rststr = get("http://"; . $dst . "/request.htm" ); # try to get
Michael Rasmussen wrote:
On Sat, May 26, 2012 at 05:52:19PM +0100, Rob Dixon wrote:
On 26/05/2012 14:07, pa...@fsmail.net wrote:
From: "Rob Dixon"
On 26/05/2012 13:51, pa...@fsmail.net wrote:
split is slower than the correct regex matching.
That is complete nonsense. Can you show a bench
sono...@fannullone.us wrote:
Subject: To quote variables or not
Your question is not about quoting variables, which is bad, but about
quoting hash keys. See:
perldoc -q quoting
A script that I'm refactoring has global variables in two different
styles, e.g.:
$main::global->{form}->{'ma
Shlomi Fish wrote:
On Sat, 19 May 2012 12:04:16 -0500
Xi Chen wrote:
I have a simple code, but it doesn't work and don't know why. Please see it
below:
Input file: 1.txt which including number and letter "o" in one line.
10o10o10
Wanted output file: 2.txt in which 10 represe
Chris Stinemetz wrote:
Hello List,
Hello,
I'm stumped on this one.
I'm getting this error:
Use of uninitialized value in length at ./DBSR.pl line 21,<> line 6.
Use of uninitialized value in length at ./DBSR.pl line 21,<> line 8.
Use of uninitialized value in length at ./DBSR.pl line 21,<>
timothy adigun wrote:
On Mon, May 7, 2012 at 8:36 AM, lina wrote:
I have two files, one with
3
2
1
another is:
3 1
3 2
6 3
How can I insert the first file into the middle of the second file,
This is one way to do it:
#!/usr/bin/perl
use warnings;
use strict;
my $part1 = get_data(
Вячеслав Агапов wrote:
Hello all.
Hello,
I have a file with logs
2012-04-13 17:06:10,881 test:dom1 CRIT home
2012-04-13 17:06:10,882 work:dom1 CRIT home
2012-04-13 17:06:10,882 my:dom1 CRIT home
2012-04-13 17:06:10,881 test:dom2 CRIT home
2012-04-13 17:06:10,882 work:dom2 CRIT home
2012-04-1
1 - 100 of 5071 matches
Mail list logo