Re: Adding perl modules, custom built .pm files

2013-05-09 Thread Shlomi Fish
Hi Dariusz, On Thu, 9 May 2013 10:08:38 -0500 Dariusz Dolecki wrote: > How do I add existing custom built perl modules that were built on a > different system to another one, I have copied over the .pm file. > Put them in the @INC : [ IRC ] perlbot: @INC rindolf: To change @INC (perldoc perl

Adding perl modules, custom built .pm files

2013-05-09 Thread Dariusz Dolecki
How do I add existing custom built perl modules that were built on a different system to another one, I have copied over the .pm file. Thanks in advance.

Re: Adding \.JPG$/\.jpg/ to a perlregexp

2011-10-17 Thread Rob Coops
On Mon, Oct 17, 2011 at 9:07 PM, Csanyi Pal wrote: > Leo Susanto writes: > > > On Mon, Oct 17, 2011 at 11:46 AM, Csanyi Pal > wrote: > >> my goal is to get in a directory the following: > >> > >> PIC1.JPG renamed as Gyermekolimpia_Ujvidek_001.jpg > >> PIC2.JPG renamed as Gyermekolimpia_

Re: Adding \.JPG$/\.jpg/ to a perlregexp

2011-10-17 Thread Leo Susanto
http://perldoc.perl.org/perlre.html s/.+(\d{3}).jpg/Gyermekolimpia_Ujvidek_$1.jpg/i >From your requirement: PIC1.JPG renamed as Gyermekolimpia_Ujvidek_001.jpg 1. the 3 last digits should be extracted: .+(\d{3}).jpg 2. rename everything before the 3 digits to: 'Gyermekolimpia_Ujvidek_': s/.+(\

Re: Adding \.JPG$/\.jpg/ to a perlregexp

2011-10-17 Thread Csanyi Pal
Leo Susanto writes: > On Mon, Oct 17, 2011 at 11:46 AM, Csanyi Pal wrote: >> my goal is to get in a directory the following: >> >> PIC1.JPG renamed as Gyermekolimpia_Ujvidek_001.jpg >> PIC2.JPG renamed as Gyermekolimpia_Ujvidek_002.jpg >>  ... >> PIC00223.JPG renamed as Gyermekolimpia_Uj

Re: Adding

2011-10-17 Thread Leo Susanto
s/.+(\d{3}).jpg/Gyermekolimpia_Ujvidek_$1.jpg/i On Mon, Oct 17, 2011 at 11:46 AM, Csanyi Pal wrote: > Hi, > > my goal is to get in a directory the following: > > PIC1.JPG renamed as Gyermekolimpia_Ujvidek_001.jpg > PIC2.JPG renamed as Gyermekolimpia_Ujvidek_002.jpg >  ... > PIC00223.JPG r

Adding

2011-10-17 Thread Csanyi Pal
Hi, my goal is to get in a directory the following: PIC1.JPG renamed as Gyermekolimpia_Ujvidek_001.jpg PIC2.JPG renamed as Gyermekolimpia_Ujvidek_002.jpg ... PIC00223.JPG renamed as Gyermekolimpia_Ujvidek_223.jpg So far I get this to work: rename -n 's/\w\w\w\w\w/sprintf("Gyermekolim

Re: [solved] parsing and adding back this string

2011-09-04 Thread Shlomi Fish
Hi Rajeev, On Sun, 4 Sep 2011 08:05:52 -0700 (PDT) Rajeev Prasad wrote: > Shlomi Fish, > > this is not complete code but part of it, '...' in top and bottom denote > that, strict warning etc is used. Well, first of all, it would be a good idea to include the complete code. Using "..." to denot

Re: [solved] parsing and adding back this string

2011-09-04 Thread Rajeev Prasad
s suggested the same. From: Shlomi Fish To: Rajeev Prasad Cc: Perl Beginners Sent: Sunday, September 4, 2011 1:25 AM Subject: Re: [solved] parsing and adding back this string Hi Rajeev, please acknowledge you have received and read this message. On Sat, 3 Sep 2011

Re: [solved] parsing and adding back this string

2011-09-04 Thread John W. Krahn
Rajeev Prasad wrote: $k=1; my $arSZ = @tmpAR=split(/"/,$line); for $x (0..$arSZ-1){ if ($x % 2 == 0) { push(@modline,"$tmpAR[$x]"); } else { my $count = $tmpAR[$x-1] =~ tr/,/,/;#try for something more correct like... =~ m/\,/g); $k = $k + $count; pus

Re: [solved] parsing and adding back this string

2011-09-03 Thread Shlomi Fish
Hi Rajeev, please acknowledge you have received and read this message. On Sat, 3 Sep 2011 15:47:42 -0700 (PDT) Rajeev Prasad wrote: > ... > ... > > $k=1; > my $arSZ = @tmpAR=split(/"/,$line); >     for $x (0..$arSZ-1){ >     if ($x % 2 == 0) { >     push(@modline,"$tmpAR[$x]"); > >     } else

Re: [solved] parsing and adding back this string

2011-09-03 Thread Rajeev Prasad
line,"STRING.$k");     } print @modline; ... ... this replaces fields in quotes with STRING-field number. From: Rajeev Prasad To: Perl Beginners Sent: Saturday, September 3, 2011 10:34 AM Subject: Re: parsing and adding back this string   comma

Re: parsing and adding back this string

2011-09-03 Thread Rajeev Prasad
er. From: Rob Dixon To: Perl Beginners Cc: Rajeev Prasad Sent: Saturday, September 3, 2011 4:13 AM Subject: Re: parsing and adding back this string On 02/09/2011 23:33, Rajeev Prasad wrote: > friends, > > I am now trying to parse this string in this way... > > x= could be a

Re: parsing and adding back this string

2011-09-03 Thread Rob Dixon
On 02/09/2011 23:33, Rajeev Prasad wrote: friends, I am now trying to parse this string in this way... x= could be anything including special character string = xx:ABC,xx,x,x,x,"x,x,x",x,x,x,"x,x",x string0=ABC string2="x,x,x" string3="x,x" string1=xx:string0,tt,x,x,x,string2,x,x,x,string3,x

Re: parsing and adding back this string

2011-09-02 Thread Brandon McCaig
On Fri, Sep 2, 2011 at 6:54 PM, Rob Dixon wrote: > I'm afraid your post doesn't make very much sense to me, and doesn't > contain a question. Can you give an example showing what you want from > some real data? Agreed. As you describe, "x" can be anything, yet your sample is full of x's all over

Re: parsing and adding back this string

2011-09-02 Thread Rob Dixon
On 02/09/2011 23:33, Rajeev Prasad wrote: friends, I am now trying to parse this string in this way... x= could be anything including special character string = xx:ABC,xx,x,x,x,"x,x,x",x,x,x,"x,x",x string0=ABC string2="x,x,x" string3="x,x" string1=xx:string0,tt,x,x,x,string2,x,x,x,string3,x

parsing and adding back this string

2011-09-02 Thread Rajeev Prasad
friends,   I am now trying to parse this string in this way...   x= could be anything including special character   string = xx:ABC,xx,x,x,x,"x,x,x",x,x,x,"x,x",x   string0=ABC string2="x,x,x" string3="x,x" string1=xx:string0,tt,x,x,x,string2,x,x,x,string3,x   final string is string1

Re: understanding adding numeric accumulator

2011-07-10 Thread Chris Nehren
Chris, your quoting mechanism is extremely unclear. It's difficult to discern what you wrote and what the people you're quoting wrote. On Fri, Jul 08, 2011 at 20:05:14 -0400 , Chris Charley wrote: > Hello JJ, > > It is sometimes helpful to put print statements in a routine to > follow the flow of

Re: understanding adding numeric accumulator

2011-07-08 Thread Chris Charley
""J. S. John"" wrote in message news:caahf0rkhyip680xk9kz+3q4uvw79s2dh8denulob_2gxlyf...@mail.gmail.com... Hi all, I'm teaching myself perl. Right now, I am stuck with this script. I don't understand how it works. I know what it does and how to do it by hand. $n = 1; while ($n < 10) { $s

Re: understanding adding numeric accumulator

2011-07-08 Thread Rob Coops
On Sat, Jul 9, 2011 at 1:33 AM, J. S. John wrote: > Hi all, > I'm teaching myself perl. Right now, I am stuck with this script. I > don't understand how it works. I know what it does and how to do it by > hand. > > $n = 1; > while ($n < 10) { >$sum += $n; >$n += 2; > } > print "The sum is

Re: understanding adding numeric accumulator

2011-07-08 Thread Jim Gibson
On 7/8/11 Fri Jul 8, 2011 4:33 PM, "J. S. John" scribbled: > Hi all, > I'm teaching myself perl. Right now, I am stuck with this script. I > don't understand how it works. I know what it does and how to do it by > hand. > > $n = 1; > while ($n < 10) { > $sum += $n; > $n += 2; > } > pri

understanding adding numeric accumulator

2011-07-08 Thread J. S. John
Hi all, I'm teaching myself perl. Right now, I am stuck with this script. I don't understand how it works. I know what it does and how to do it by hand. $n = 1; while ($n < 10) { $sum += $n; $n += 2; } print "The sum is $sum.\n" I know $sum is initially 0 (undef). I see that $sum becomes

Re: Adding file contents into hashes

2011-06-07 Thread John W. Krahn
venkates wrote: Hi, Hello, This is a snippet of the data ENTRY K1 KO NAME E1.1.1.1, adh DEFINITION alcohol dehydrogenase [EC:1.1.1.1] PATHWAY ko00010 Glycolysis / Gluconeogenesis ko00071 Fatty acid metabolism ko00350 Tyrosine metabolism ko00625 Chloroalkane and chloroalkene degradation k

Adding file contents into hashes

2011-06-07 Thread venkates
Hi, This is a snippet of the data ENTRY K1 KO NAMEE1.1.1.1, adh DEFINITION alcohol dehydrogenase [EC:1.1.1.1] PATHWAY ko00010 Glycolysis / Gluconeogenesis ko00071 Fatty acid metabolism ko00350 Tyrosine metabolism

Re: Object introspection + adding method - SOLVED

2010-10-26 Thread C.DeRykus
On Oct 23, 2:37 pm, da...@davidfavor.com (David Favor) wrote: [omitted] > > Just be sure you know what you are doing.  Adding a method to somone else's > > class can be considered rude.  See the NOTE in perldoc perlmodlib. > > sub add_class_method { >

Re: Object introspection + adding method

2010-10-25 Thread Dr.Ruud
On 2010-10-23 18:50, David Favor wrote: Given an instantiated class object, what's the best way to add additional methods after instantiation. Specifically I'm working with qpsmtpd and desire to add a method is_spooled() to every session, so I can call if ($self->is_spooled) rather then is_spoo

Re: Object introspection + adding method - SOLVED

2010-10-24 Thread C.DeRykus
On Oct 23, 2:37 pm, da...@davidfavor.com (David Favor) wrote: > Paul Johnson wrote: [snip] >      add_class_method($class,$name,$code); > >      # all three of these invocations works correctly >      test_method($self); >      &$code($self); >      $self->test_method; > > } Hm, strawberr

Re: Object introspection + adding method

2010-10-24 Thread Jenda Krynicky
From: "Jeff Peng" > > On Sat, Oct 23, 2010 at 07:52:50PM +0200, Shlomi Fish wrote: > > > > > Just be sure you know what you are doing. Adding a method to somone > > else's > > class can be considered rude. See the NOTE in perldoc perlmodlib. >

Re: Object introspection + adding method

2010-10-23 Thread Jeff Peng
> On Sat, Oct 23, 2010 at 07:52:50PM +0200, Shlomi Fish wrote: > > Just be sure you know what you are doing. Adding a method to somone > else's > class can be considered rude. See the NOTE in perldoc perlmodlib. > He/she is maybe coming from other language like Ruby. I

Re: Object introspection + adding method - SOLVED

2010-10-23 Thread David Favor
Or perhaps more recommended: package A; sub a { print "a" } package B; sub A::b { shift->a; print "b" } (bless {}, "A")->b; Just be sure you know what you are doing. Adding a method to somone else's class can be considered rude. See the NOTE in perldoc perl

Re: Object introspection + adding method

2010-10-23 Thread Paul Johnson
t; There are closer-to-the-metal ways but they are probably less recommended. Or perhaps more recommended: package A; sub a { print "a" } package B; sub A::b { shift->a; print "b" } (bless {}, "A")->b; Just be sure you know what you are doing. Adding a method

Re: Object introspection + adding method

2010-10-23 Thread Shlomi Fish
On Saturday 23 October 2010 18:50:44 David Favor wrote: > Given an instantiated class object, what's the > best way to add additional methods after instantiation. > > Specifically I'm working with qpsmtpd and desire to > add a method is_spooled() to every session, so I can > call if ($self->is_spo

Object introspection + adding method

2010-10-23 Thread David Favor
Given an instantiated class object, what's the best way to add additional methods after instantiation. Specifically I'm working with qpsmtpd and desire to add a method is_spooled() to every session, so I can call if ($self->is_spooled) rather then is_spooled($self)... Thanks. -- Love feeling yo

Re: adding \n?

2010-07-08 Thread Dr.Ruud
Jeff Pang wrote: @y=map {$_."\n"} @x; Why write it that ugly? Whitespace is cheap, "$_\n" looks more readable to me (and no need for a "slower" block, though that is optimized away in the new perls anyway). -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional c

Re: adding \n?

2010-07-06 Thread Jeff Pang
-Original-Nachricht- > Subject: adding \n? > Date: Wed, 07 Jul 2010 05:30:14 +0200 > From: Noah > To: Perl Beginners > Hi there, > > I want to add '\n' to each element of @contact_list. > what are my options for doing so? > Hi, Perl's map

Re: adding \n?

2010-07-06 Thread John W. Krahn
Noah wrote: Hi there, Hello, I want to add '\n' to each element of @contact_list. what are my options for doing so? I assume by "add" you mean append? Or do you want to add it somewhere else in the string? here is the line my @contact_list = sort keys %contacts; snip ---

adding \n?

2010-07-06 Thread Noah
Hi there, I want to add '\n' to each element of @contact_list. what are my options for doing so? here is the line my @contact_list = sort keys %contacts; snip - -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

Re: Adding cpan modules as non root in RHEL

2010-06-19 Thread Shlomi Fish
On Saturday 19 Jun 2010 03:13:44 Joseph L. Casale wrote: > I need a few modules not provided by Base or 3rd party rpm repos > and since I don't want to mess up the rpm db, I am installing these > cpan modules as non root into /opt/cpan by using 'makepl_arg' => > q[PREFIX=/opt/cpan] > > The module

Re: Adding cpan modules as non root in RHEL

2010-06-18 Thread Jim Gibson
On 6/18/10 Fri Jun 18, 2010 5:13 PM, "Joseph L. Casale" scribbled: > I need a few modules not provided by Base or 3rd party rpm repos > and since I don't want to mess up the rpm db, I am installing these > cpan modules as non root into /opt/cpan by using 'makepl_arg' => > q[PREFIX=/opt/cpan] >

Adding cpan modules as non root in RHEL

2010-06-18 Thread Joseph L. Casale
I need a few modules not provided by Base or 3rd party rpm repos and since I don't want to mess up the rpm db, I am installing these cpan modules as non root into /opt/cpan by using 'makepl_arg' => q[PREFIX=/opt/cpan] The module I need is MIME::Tools which needs a newer File::Temp (0.16 versus ne

Re: adding populations

2009-10-08 Thread John W. Krahn
Jesus Fernandez wrote: Dear friends, Hello I'm trying to write a program that draws 5,000 numbers from an exponential distribution with mean 4N/k(k-1) N=10 000 k = 25 I have this: #!jesusafernandez/bin/perl use warnings; use strict; $k = 25; my $k = 25; $N = 1; my $N = 10_000

Re: adding populations

2009-10-08 Thread Jesus Fernandez
Dear friends, I'm trying to write a program that draws 5,000 numbers from an exponential distribution with mean 4N/k(k-1) N=10 000 k = 25 I have this: #!jesusafernandez/bin/perl $k = 25; $N = 1; for ($samp=0; $samp<5000; $samp++) { while ($k!= "$25") { $mean = 4$N/$k($k

Re: adding populations

2009-10-06 Thread Telemachus
On Tue Oct 06 2009 @ 11:24, Jesus Fernandez wrote: > Dear friends, > > I'm working in a genetic drift simulation and I want to add a second > population to my script, any suggestions how to do that? Is this a follow-up to a previous question? Either way, please keep in mind that we don't have any

adding populations

2009-10-06 Thread Jesus Fernandez
Dear friends, I'm working in a genetic drift simulation and I want to add a second population to my script, any suggestions how to do that? j

adding namespace to row and column

2009-08-31 Thread Ganesh Babu N
Dear all, I am already having a XML document. In that document i want add namespace to an element. How to achieve this. Regards, Ganesh -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Adding Very Large Numbers and Display

2008-11-21 Thread Mr. Shawn H. Corey
On Fri, 2008-11-21 at 11:02 -0800, [EMAIL PROTECTED] wrote: > Hello > > I have a perl script that is working fine. The script involves creating an > array of numbers. The values of these numbers in the is quite large (12 > integer digits or more). I can easily display the numbers with a simple p

Adding Very Large Numbers and Display

2008-11-21 Thread andrewmchorney
Hello I have a perl script that is working fine. The script involves creating an array of numbers. The values of these numbers in the is quite large (12 integer digits or more). I can easily display the numbers with a simple print statement. I want to display the contents with one element per l

Adding http://learn.perl.org/faq/beginners.html to http://lists.perl.org/showlist.cgi?name=beginners

2008-09-27 Thread Philip Durbin
, however, so I thought I'd see if anyone on this list has the power and interest in adding the FAQ link and fixing the feedback address at http://lists.perl.org Thanks in advance to anyone who can help with either of these items. Phil 1. http://www.nntp.perl.org/group/perl.beginners/20

Re: PDF::API2, error "Can't call method "val".... when adding a picture to the PDF

2008-07-15 Thread Dermot
a bit poorly documented. Usually this means something isn't initialized, I'd say $photo in this case. Try adding a line like print STDERR "XP=$xp, YP=$yp To ensure all your variables contain values. Also have a look at the carp module it might offer you some additional method

PDF::API2, error "Can't call method "val".... when adding a picture to the PDF

2008-07-14 Thread ChrisC
I am not sure what is going on. It works, then it does not? Is there a solution for this? I have been able to find little to NO doc on this. use strict; . . . sub picture { my $picture = shift; my $xp = shift; my $yp = shift; my $sp = shift; $photo->image

Re: Adding a hash to an existing hash?

2008-01-16 Thread pzimmermann
On Jan 16, 6:21 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > [EMAIL PROTECTED] wrote: > > On Jan 15, 10:57 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > >> [EMAIL PROTECTED] wrote: > >>> How do I change the value stored to a hash reference? > >> C:\home>type test.pl > >> my %hash = ( > >>

Re: Adding a hash to an existing hash?

2008-01-16 Thread Rob Dixon
[EMAIL PROTECTED] wrote: On Jan 15, 10:57 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: [EMAIL PROTECTED] wrote: How do I change the value stored to a hash reference? C:\home>type test.pl my %hash = ( key => { refkey => 'oldvalue', }, ); print "$hash{key}->{refkey}\n"; $

Re: Adding a hash to an existing hash?

2008-01-16 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: On Jan 15, 10:57 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: [EMAIL PROTECTED] wrote: How do I change the value stored to a hash reference? C:\home>type test.pl my %hash = ( key => { refkey => 'oldvalue', }, ); print "$hash{key}->{refkey}\n"; $

Re: Adding a hash to an existing hash?

2008-01-16 Thread pzimmermann
On Jan 15, 10:57 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > [EMAIL PROTECTED] wrote: > > How do I change the value stored to a hash reference? > > C:\home>type test.pl > my %hash = ( > key => { > refkey => 'oldvalue', > }, > ); > print "$hash{key}->{refkey}\n"; > $hash{k

Re: Adding a hash to an existing hash?

2008-01-15 Thread Rob Dixon
[EMAIL PROTECTED] wrote: On Jan 14, 6:18 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: [EMAIL PROTECTED] wrote: > This is the bit of code I'm attempting to use, "$workPackages{ $tempHash{ WORK_PACKAGE } } { $tempHash{ USE_ON_CODE } } = $tempHash{ TECHNICAL_DIRECTIVE };" I get the following error

Re: Adding a hash to an existing hash?

2008-01-15 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: How do I change the value stored to a hash reference? C:\home>type test.pl my %hash = ( key => { refkey => 'oldvalue', }, ); print "$hash{key}->{refkey}\n"; $hash{key}->{refkey} = 'newvalue'; print "$hash{key}->{refkey}\n"; C:\home>test.pl oldvalue newv

Re: Adding a hash to an existing hash?

2008-01-15 Thread philzenbowl
On Jan 14, 6:18 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > [EMAIL PROTECTED] wrote: > > > > > > This is the bit of code I'm attempting to use, > > "$workPackages{ $tempHash{ WORK_PACKAGE } } > > { $tempHash{ USE_ON_CODE } } = $tempHash{ TECHNICAL_DIRECTIVE };" I > > get the following error, "Can'

Re: Adding a hash to an existing hash?

2008-01-14 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > This is the bit of code I'm attempting to use, "$workPackages{ $tempHash{ WORK_PACKAGE } } { $tempHash{ USE_ON_CODE } } = $tempHash{ TECHNICAL_DIRECTIVE };" I get the following error, "Can't use string ("1") as a HASH ref while "strict refs" " Is this because the valu

Re: Adding a hash to an existing hash?

2008-01-14 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: This is the bit of code I'm attempting to use, "$workPackages{ $tempHash{ WORK_PACKAGE } } { $tempHash{ USE_ON_CODE } } = $tempHash{ TECHNICAL_DIRECTIVE };" I get the following error, "Can't use string ("1") as a HASH ref while "strict refs" " For me, that piece of cod

Adding a hash to an existing hash?

2008-01-14 Thread philzenbowl
This is the bit of code I'm attempting to use, "$workPackages{ $tempHash{ WORK_PACKAGE } } { $tempHash{ USE_ON_CODE } } = $tempHash{ TECHNICAL_DIRECTIVE };" I get the following error, "Can't use string ("1") as a HASH ref while "strict refs" " Is this because the value stored needs to be the refe

Re: Problem with adding a connection with Win32::NetResource

2008-01-03 Thread Nash
On Jan 3, 12:19 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > If you mean that it doesn't report an error if you write > >    AddConnection({ RemoteName => 'Nash' }); > > then it's simply because you haven't asked it to do anything. You don't > get a local connection to a resource though - nothin

Re: Problem with adding a connection with Win32::NetResource

2008-01-02 Thread Jenda Krynicky
From: Nash <[EMAIL PROTECTED]> > Thanks to Rob and purlgurl, who answered me by mail. It turns out > RemoteName was wrong. Nevertheless, it worked when I didn't define > other RemoteShare parameters. Could anyone explain that? > Since I have a shared folder named Nash on computer named Nash, \\\ >

Re: Problem with adding a connection with Win32::NetResource

2008-01-02 Thread Rob Dixon
Nash wrote: > Thanks to Rob and purlgurl, who answered me by mail. It turns out RemoteName was wrong. Nevertheless, it worked when I didn't define other RemoteShare parameters. Could anyone explain that? Since I have a shared folder named Nash on computer named Nash, \\\ \Nash\\Nash did the trick

Re: Problem with adding a connection with Win32::NetResource

2008-01-02 Thread Nash
Thanks to Rob and purlgurl, who answered me by mail. It turns out RemoteName was wrong. Nevertheless, it worked when I didn't define other RemoteShare parameters. Could anyone explain that? Since I have a shared folder named Nash on computer named Nash, \\\ \Nash\\Nash did the trick. Tried answerin

Re: Problem with adding a connection with Win32::NetResource

2008-01-01 Thread Rob Dixon
Nash wrote: Hi all, I'm new to Perl and I'm trying to use it to connect to a shared disc through a home network. This is what I've tried: #!/usr/bin/perl -w use Win32::NetResource;

Re: Problem with adding a connection with Win32::NetResource

2007-12-31 Thread Nash
On Dec 30, 3:42 am, [EMAIL PROTECTED] (Chas. Owens) wrote: > What error does it return if you use a LocalName other than X:? I have tried other LocalNames, tried uppercase and lowercase. It still gives me ErrorCode 53 (the network path was not found) :( Happy New Year to all :) Nash -- To uns

Re: Problem with adding a connection with Win32::NetResource

2007-12-29 Thread Tom Phoenix
On Dec 28, 2007 6:45 AM, Nash <[EMAIL PROTECTED]> wrote: > On Dec 28, 5:55am, [EMAIL PROTECTED] (Chas. Owens) wrote: > > It also looks (based on the answer to your second question) like X: is > > not a valid name. Is it possible that you have already mapped a drive > > to X:? > > Of course not :)

Re: Problem with adding a connection with Win32::NetResource

2007-12-29 Thread Chas. Owens
On Dec 29, 2007 7:44 AM, Nash <[EMAIL PROTECTED]> wrote: > On Dec 28, 7:11pm, [EMAIL PROTECTED] (Chas. Owens) wrote: > > > Hmm, does it still work when all you give it is the RemoteName? > > Yes it does, that's what's puzzling me. I'll try using the strict and > warnings pragmas, the way I saw in o

Re: Problem with adding a connection with Win32::NetResource

2007-12-29 Thread Nash
On Dec 28, 7:11 pm, [EMAIL PROTECTED] (Chas. Owens) wrote: > Hmm, does it still work when all you give it is the RemoteName? Yes it does, that's what's puzzling me. I'll try using the strict and warnings pragmas, the way I saw in other scripts. Nash -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Problem with adding a connection with Win32::NetResource

2007-12-28 Thread Nash
Ooops, accidentaly left the # characters in RemoteShare definition... Disregard them. :) Nash -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Problem with adding a connection with Win32::NetResource

2007-12-28 Thread Chas. Owens
On Dec 28, 2007 9:45 AM, Nash <[EMAIL PROTECTED]> wrote: > On Dec 28, 5:55am, [EMAIL PROTECTED] (Chas. Owens) wrote: > > > You are not using the strict pragma (this doesn't effect your current > > problem, but it is still a bad idea). > > Like I said, I'm new to Perl. By "pragma" I guess you mean s

Re: Problem with adding a connection with Win32::NetResource

2007-12-28 Thread Nash
On Dec 28, 5:55 am, [EMAIL PROTECTED] (Chas. Owens) wrote: > You are not using the strict pragma (this doesn't effect your current > problem, but it is still a bad idea). Like I said, I'm new to Perl. By "pragma" I guess you mean syntax? > It also looks (based on the answer to your second questi

Re: Problem with adding a connection with Win32::NetResource

2007-12-27 Thread Chas. Owens
On Dec 27, 2007 3:15 PM, Nash <[EMAIL PROTECTED]> wrote: snip > The program actually works if I omit the 'LocalName' definition in > line 4, i.e. it makes the connection. However, since I don't have a > local name I can't subseqently cancel the connection, and I'd like to > be able to do that. > Wi

Problem with adding a connection with Win32::NetResource

2007-12-27 Thread Nash
Hi all, I'm new to Perl and I'm trying to use it to connect to a shared disc through a home network. This is what I've tried: #!/usr/bin/perl -w use Win32::NetResource; $RemoteShare

Re: Adding numbers of vector, in hash table

2007-10-22 Thread Jenda Krynicky
From: "Jeff Pang" <[EMAIL PROTECTED]> > On 10/22/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I would like, put element's array in hash table. > > How I can do it ? > > > > Hi, > > use AoH,like, > > my @array = (1,2,3,4); > my %hash = (key1 => [EMAIL PROTECTED]); > > then y

Re: Adding numbers of vector, in hash table

2007-10-22 Thread Jeff Pang
On 10/22/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote: > Hello, > > I would like, put element's array in hash table. > How I can do it ? > Hi, use AoH,like, my @array = (1,2,3,4); my %hash = (key1 => [EMAIL PROTECTED]); then you can access the array's first element by, $hash{key1}->[0]; the

Adding numbers of vector, in hash table

2007-10-22 Thread Rodrigo Tavares
Hello, I would like, put element's array in hash table. How I can do it ? my %numbers = ( zero => '0', one => '1', two => '2', three => '3', four => '4', five => '5', six => '6', seven => '7',

Re: adding data to a file before it gets regexed

2007-09-14 Thread Pat Rice
Thanks all for the help I'm havng a go wrighting it at the moment Pat On 9/13/07, Moon, John <[EMAIL PROTECTED]> wrote: > > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 13, 2007 2:01 PM > To: Perl beginners > Subject: Re: adding data to a f

RE: adding data to a file before it gets regexed

2007-09-13 Thread Moon, John
From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 2:01 PM To: Perl beginners Subject: Re: adding data to a file before it gets regexed Moon, John wrote: > From: John W. Krahn [mailto:[EMAIL PROTECTED] >> >> Here is another way to do it: >&g

Re: adding data to a file before it gets regexed

2007-09-13 Thread John W. Krahn
Moon, John wrote: From: John W. Krahn [mailto:[EMAIL PROTECTED] Here is another way to do it: my $logs_total = () = <*log>; my $processed = @ARGV = ; my %logs; $logs{ $ARGV }++ while <>; print "There are $logs_total logs HERE\n"; print "I processed $processed logs\n"; for my $filenm ( sort ke

RE: adding data to a file before it gets regexed

2007-09-13 Thread Moon, John
-Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 12:42 PM To: Perl beginners Subject: Re: adding data to a file before it gets regexed Moon, John wrote: > > thanks all for the replies, I'm trying to parse log files. >

Re: adding data to a file before it gets regexed

2007-09-13 Thread John W. Krahn
Moon, John wrote: thanks all for the replies, I'm trying to parse log files. so I got a bunch of logs in a directory, put them together and then parse them, I'm trying to keep a reference of the log files, so I know what log they came from, as I'm need to keep the file name to put it in to a an

RE: adding data to a file before it gets regexed

2007-09-13 Thread Moon, John
From: Pat Rice [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 11:14 AM To: Andrew Curry Cc: Chas Owens; beginners@perl.org; [EMAIL PROTECTED] Subject: Re: adding data to a file before it gets regexed thanks all for the replies, I'm trying to parse log files. so I got a bun

Re: adding data to a file before it gets regexed

2007-09-13 Thread Pat Rice
On 9/13/07, Andrew Curry <[EMAIL PROTECTED]> wrote: > > But whats your end goal? What is it going to do at the end? > > -Original Message- > From: Pat Rice [mailto:[EMAIL PROTECTED] > Sent: 13 September 2007 14:16 > To: Chas Owens > Cc: beginners@perl.org &

RE: adding data to a file before it gets regexed

2007-09-13 Thread Andrew Curry
But whats your end goal? What is it going to do at the end? -Original Message- From: Pat Rice [mailto:[EMAIL PROTECTED] Sent: 13 September 2007 14:16 To: Chas Owens Cc: beginners@perl.org Subject: Re: adding data to a file before it gets regexed Thanks Chas for the reply what I&#

Re: adding data to a file before it gets regexed

2007-09-13 Thread Pat Rice
se it in a regex afterwards, so it will break out what file was assiated with the line, as I have a list of files that i am adding together. I'm using opendir to get a list of files, then opening the files using open, but I want to add the file to the string. Thanks Pat On 9/13/07, Cha

Re: adding data to a file before it gets regexed

2007-09-13 Thread Chas Owens
On 9/13/07, Pat Rice <[EMAIL PROTECTED]> wrote: > hi all > I have the following problem. > I'm trying to read the a file in line by line. using a for each statment, > but I want to modify each line as it come in so that I can add the file > name that I am looking in to the line. > > eg. looing in

adding data to a file before it gets regexed

2007-09-13 Thread Pat Rice
6 47 my $data_file = "test/$datafile2"; 48 49 50 open (DATA, "$data_file") or die "can't open $data_file $!"; 51 52 #change made here, changing data and adding datafile 53 $DataVariable=; 54 $combined

Re: Adding text in file written in Perl

2007-08-07 Thread Srinivas
Jeff Pang wrote: -Original Message- From: [EMAIL PROTECTED] Sent: Aug 7, 2007 10:06 PM To: beginners@perl.org Subject: Adding text in file written in Perl Hello, I have written a Perl script that creates the dhcpd.conf and / etc/hosts file for Red Hat Linux. The data is derived

Re: Adding text in file written in Perl

2007-08-07 Thread Jeff Pang
-Original Message- >From: Jeff Pang <[EMAIL PROTECTED]> > >1. write that line to hosts file at first, >open HD,">","/etc/hosts" or die $!; >print HD "127.0.0.0 localhost.localhostdomain localhost\n"; >close HD; > >2. wirte the other lines to hosts file then, >open HD,">>","/etc/hosts" or

Re: Adding text in file written in Perl

2007-08-07 Thread Jeff Pang
-Original Message- >From: [EMAIL PROTECTED] >Sent: Aug 7, 2007 10:06 PM >To: beginners@perl.org >Subject: Adding text in file written in Perl > >Hello, I have written a Perl script that creates the dhcpd.conf and / >etc/hosts file for Red Hat Linux. The data is

Re: Adding text in file written in Perl

2007-08-07 Thread Paul Lalli
On Aug 7, 10:06 am, [EMAIL PROTECTED] (Starr Corbin) wrote: > Hello, I have written a Perl script that creates the dhcpd.conf and / > etc/hosts file for Red Hat Linux. The data is derived from a single > text file. What is stumping me is how to insert an automatic text > line for just the /etc/ho

Re: Adding text in file written in Perl

2007-08-07 Thread Mr. Shawn H. Corey
[EMAIL PROTECTED] wrote: How can I get my 127.0.0.0 to appear at the top of my /etc/hosts/ file every time I run the script to create it? Rewrite the entire file. Most file systems are not set up to allow you prepend to a file. -- Just my 0.0002 million dollars worth, Shawn "For the th

Adding text in file written in Perl

2007-08-07 Thread starr . corbin
Hello, I have written a Perl script that creates the dhcpd.conf and / etc/hosts file for Red Hat Linux. The data is derived from a single text file. What is stumping me is how to insert an automatic text line for just the /etc/hosts part of my script that would automatically insert a text line at

Re: Adding a line in a file inside many directories

2007-06-29 Thread John W. Krahn
[EMAIL PROTECTED] wrote: On Jun 28, 12:00 pm, [EMAIL PROTECTED] (Ved) wrote: Now I have to print a single line at say line number 20 in each of 150 number of kat.s file. Hey, another chance to show off my favorite Perl module, IO::All. Situation is bit complex (atleast for a beginer like me

Re: Adding a line in a file inside many directories

2007-06-29 Thread usenet
On Jun 28, 12:00 pm, [EMAIL PROTECTED] (Ved) wrote: > Now I have to print a single line at say line number 20 in each of 150 > number of kat.s file. Hey, another chance to show off my favorite Perl module, IO::All. > Situation is bit complex (atleast for a beginer like me). Actually it is so si

Re: Adding a line in a file inside many directories

2007-06-29 Thread Tom Phoenix
On 6/28/07, Ved <[EMAIL PROTECTED]> wrote: open (VEDIN, 'list_of_dir.txt') or die "Cannot open 'File.txt' $!"; Why does the error message mention the wrong file name? my @rgstr=; foreach my $file_list (@rgstr) { print $file_list ;#printing list of dir The items in this list haven't

Adding a line in a file inside many directories

2007-06-29 Thread Ved
Hi all, I am a beginer in PERL. What I am trying to do is this: I have a 150 directories, each having a file "kat.s" in them. I have names of all these directories in a text file "list_of_dir.txt". I have to open the each of "kat.s" in all the 150 directories and add a line(say "ABCD" at line numb

Adding a line in a file inside many directories

2007-06-29 Thread Ved
Hi All, Situation is bit complex (atleast for a beginer like me). Directory structure is somewhat like this: testcases--> 150 Directories (names starting with mixed or green.) --- > kat.s i.e. a directrory named testcases has 150 number of directories in it and each of those 150 number of director

Perl proxy - adding user defined HEADERS

2006-11-10 Thread luke devon
Hi , I wanted to put a perl script into the parameter of squid redirect module, which should have a capable of connecting to another server and passes another user defined HEADER into the squid back to get access web proxy and should be handling more threads for all the users . How it wo

  1   2   3   >