Jim Canon wrote:
> Hi,
Hello,
> This is my first question, I appreciate any information you provide. I want
> to compare the numbers after : in @jn to the numbers after job in @job1 and
> @job2.
>
> [ snip ]
>
> I want to put what is missing in @jn compared to @job1 and @job2 in
> @jobMissing :
Dr.Ruud wrote:
while ( )
{
next if $d{$_};
print;
$d{$_} = 1;
}
Got the idea. Many thanks!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi,
This is my first question, I appreciate any information you provide. I want
to compare the numbers after : in @jn to the numbers after job in @job1 and
@job2.
@jn =
JN.2007:555
JN.2007:8433
JN.2007:594
JN.2007:111
JN.2007:4663
JN.2007.321
JN.2007:2221
@job1 =
job555
job572
job8433
job873
"Dr.Ruud" schreef:
> beast:
>> a 100
>> a 102
>> ...
>> c 100
>> a 102
>> ...
>>
>> I would like to have a list (either array or hash) with unique line .
>
> perl -ne'$_{$_}||=print' datafile
Jason Roth's version:
perl -ne'$$_||=print' datafile
> or
>
> perl -pe'$_ x=!$$_++' datafile
-
"Dr.Ruud" <[EMAIL PROTECTED]> wrote:oryann9 schreef:
> "Dr.Ruud" wrote: beast schreef:
>> beast:
>>> a 100
>>> a 102
>>> c 100
>>> a 102
>>> b 111
>>> c 100
>>> c 102
>>> c 100
>>> c 100
>>> a 102
>>> ...
>>>
>>> I would like to have a list (either array or hash) with unique line
.
>>
>> per
FamiLink Admin wrote:
> Hello all.
Hello,
> I am trying to read a log file then look for a website and score. If
> that website has a score >100, take it and add it to a "Check me" list.
It would be easier to help if we could see examples of valid and invalid log
file entries.
> 1. I don't wan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dukelow, Don wrote:
> Does anyone have a favorite method the checks for existence of a file or
> directory on remote system. I know it can be done with a system call, but
> can Perl do it within its self?
If you look in perldoc -f -X, there is a list
If we're just going for confusing concise one liners then I would use
perl -ne '$$_||=print'
You save three whole characters by using the symbol table instead of a hash :)
On 1/11/07, Dr.Ruud <[EMAIL PROTECTED]> wrote:
oryann9 schreef:
> "Dr.Ruud" <[EMAIL PROTECTED]> wrote: beast schreef:
>>
Does anyone have a favorite method the checks for existence of a file or
directory on remote system. I know it can be done with a system call, but
can Perl do it within its self?
Don Dukelow
smime.p7s
Description: S/MIME cryptographic signature
oryann9 schreef:
> "Dr.Ruud" <[EMAIL PROTECTED]> wrote: beast schreef:
>> beast:
>>> a 100
>>> a 102
>>> c 100
>>> a 102
>>> b 111
>>> c 100
>>> c 102
>>> c 100
>>> c 100
>>> a 102
>>> ...
>>>
>>> I would like to have a list (either array or hash) with unique line
.
>>
>> perl -ne'$_{$_}||=print
HoH
'jblow' => {
'uid' => '2195',
'gecos' => 'Joe Blow,,,',
'gid' => '20'
},
snippet.
( $name, $p, $uid, $gid, $gecos, $dir, $s ) = split( ':' );
$hash1{$name} -> {'uid'}
HoH
'jblow' => {
'uid' => '2195',
'gecos' => 'Joe Blow,,,',
'gid' => '20'
},
snippet.
( $name, $p, $uid, $gid, $gecos, $dir, $s ) = split( ':' );
$hash1{$name} -> {'uid'}
On 1/11/07, hOURS <[EMAIL PROTECTED]> wrote:
Jay Savage <[EMAIL PROTECTED]> wrote: On 1/11/07, hOURS wrote:
>
>
> Jay Savage wrote: On 1/11/07, hOURS wrote:
> [snip]
> Thanks Jay. I can't believe I didn't think of that myself. I put in the 1;'s and the
"or die". It's not that the requi
Jay Savage <[EMAIL PROTECTED]> wrote: On 1/11/07, hOURS wrote:
>
>
> Jay Savage wrote: On 1/11/07, hOURS wrote:
> [snip]
> Thanks Jay. I can't believe I didn't think of that myself. I put in the
> 1;'s and the "or die". It's not that the requires are failing - I get the
> same results.
"Mumia W." schreef:
> Beginner:
>> This is the sequence I would like to change to a single space:
>> 20a020a020a0
>
> AFAIK, tr/// can't do this.
As Tom wrote: tr/\xA0\x20/\x20/s
Variant: tr/\t\n\f\r \xA0/ /s
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTE
On 1/11/07, hOURS <[EMAIL PROTECTED]> wrote:
Jay Savage <[EMAIL PROTECTED]> wrote: On 1/11/07, hOURS wrote:
[snip]
Thanks Jay. I can't believe I didn't think of that myself. I put in the 1;'s and the
"or die". It's not that the requires are failing - I get the same results. I
adde
Jay Savage <[EMAIL PROTECTED]> wrote: On 1/11/07, hOURS wrote:
[snip]
> Some modifications I made: I changed the names of the programs being tested
> to fit what I had. I reduced the alarm time from one hour down to a few
> seconds. I included statements to print out error messages. (The
Hello all.
I am trying to read a log file then look for a website and score. If that
website has a score >100, take it and add it to a "Check me" list.
1. I don't want to "recheck" so I have a list of checked sites that I want
to verify with.
2. I don't want duplicates added to the "check m
Emilio Casbas wrote:
> I know that this is not a exact perl question, but maybe someone has a
> perl solution.
>
> You have the passwd file such this:
>
>
> test:x:593:501::/usr/local/etc5/test:/bin/bash
>
>
On 1/11/07, hOURS <[EMAIL PROTECTED]> wrote:
[snip]
Some modifications I made: I changed the names of the programs being
tested to fit what I had. I reduced the alarm time from one hour down to a
few seconds. I included statements to print out error messages. (The
original if and
I know that this is not a exact perl question, but maybe someone has a
perl solution.
You have the passwd file such this:
test:x:593:501::/usr/local/etc5/test:/bin/bash
and you have to convert it to:
---
Dave Gray <[EMAIL PROTECTED]> wrote: On 1/8/07, hOURS wrote:
> Hi everyone,
> Jay offered me the following code to help with something. I don't undertand
> it, but tried to use it anyway to see if it would work. The computer told me
> there was a syntax error in the area I highlighted in
> ""Beginner"" == "Beginner" <[EMAIL PROTECTED]> writes:
"Beginner"> I have to do some sanity checks on a large xml file of addresses
"Beginner"> (snip below). I have been using XML::LibXML and seem to have
started
"Beginner"> ok but I am struggling to navigate around a record.
Take a loo
"Dr.Ruud" <[EMAIL PROTECTED]> wrote: beast schreef:
> a 100
> a 102
> c 100
> a 102
> b 111
> c 100
> c 102
> c 100
> c 100
> a 102
> ...
>
> I would like to have a list (either array or hash) with unique line .
perl -ne'$_{$_}||=print' datafile
or
perl -pe'$_ x=!$$_++' datafile
--
Affi
Hi,
I have to do some sanity checks on a large xml file of addresses
(snip below). I have been using XML::LibXML and seem to have started
ok but I am struggling to navigate around a record.
In the sample date below your'll see some addresses with "DO NOT..."
in. I can locate them easily enough
I'm trying to extract the SHA1 hashes out of a .torrent file using
Net::BitTorrent::File, among other information, but can't seem to
figure out how to get them. I keep getting binary data, not the ascii
hash. Can anyone tell me what I'm doing wrong here?
#!/usr/bin/perl
use strict;
use warnings;
I need to call that program from a perl script. I tried this using eval
function. But it failed.
Can i know how to do this?
Hi,
I am not sure, so I'll frame an answer for my answer :D
"Wouldn't it work if you first determined the OS and then made a system
call accordingly...
Like:
System(/*pr
I have borrowed a Logitech Quickcam messenger (046d:08f0) from my brother.
Got the driver working (in essence it creates the /dev/video0) but it keeps
crashing my players.
Mplayer and ffmpeg crashes, Xawtv manages to get moving images for about a
second and crashes afterwards.
So got to figure th
On 1/10/07, Peter Scott <[EMAIL PROTECTED]> wrote:
On Wed, 10 Jan 2007 08:32:26 -0500, Muttley Meen wrote:
> On 1/10/07, Peter Scott <[EMAIL PROTECTED]> wrote:
>> On Wed, 10 Jan 2007 07:37:24 -0500, Muttley Meen wrote:
>> > I have the code:
>> > $SIG{__WARN__} = sub { print $_[0]; } ;
>>
>> perld
On 11 Jan 2007 at 2:49, Oliver Block wrote:
> Hello list,
>
> first of all a blessed 2007 to all of you.
>
> Can anyone tell me, if there is a way to force CGI.pm to deliver the html
> code
> with a DOCTYPE switch for HTML4 and not XHTML?
>
> As there are some problems with the media type for
On Wed, 2007-01-10 at 07:37 -0500, Muttley Meen wrote:
> Hi.
>
> I have the code:
>
> $SIG{__WARN__} = sub { print $_[0]; } ;
>
> I'm expecting that when i use
> warn "WARN"; only "WARN" will be printed to STDERR, no other text.
> but perl is smart to tell me the file and the line, even though I
-Original Message-
From: Dharshana Eswaran [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 11, 2007 12:12 PM
To: Jeff Pang
Cc: Perl Beginners
Subject: Re: Calling a perl program from a perl script
On 1/11/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
>
>
> >I Have a perl program which runs
32 matches
Mail list logo