Re: Multi line file handling

2015-10-19 Thread Ian
On Mon, Oct 19, 2015 at 9:46 AM, Shlomi Fish wrote: > Hi Ian and Prashant and all, > > On Mon, 19 Oct 2015 09:28:15 -0500 > Ian wrote: > > > Take a look at File::Slurp. > > > > Just for the record, using File::Slurp is no longer recommended and one > should

Re: Multi line file handling

2015-10-19 Thread Ian
it is possible ? > for example - > > open ( F1 ,"file.txt") || die "$!"; > > $a=; > > if (/window/i){print > "it is present\n"; > } > > > -- Ian http://www.cicsworld.com

Re: Programming Help Needed

2013-10-02 Thread Ian
Angela, ActiveState offer professional service: http://www.activestate.com/support/open-source-consulting and Cambria.com. I cannot vouch for either but I looked at them awhile ago. Ian On Tue, Oct 1, 2013 at 4:37 PM, Angela Barone wrote: > Hello, > > I don't know i

Re: Nature of this list

2011-04-22 Thread Ian
e there were a LOT of other people that read your comments to me the same way I did. As an insult. The code did work. that was the crux of the matter. If you are to arrogant to verify it, do not assume. Here we have a whole thread dedicated to bullying and still you don't get it. Ian

Re: Nature of this list

2011-04-22 Thread Ian
Randal> If you imply that you have a proven solution, you are lying to them. I ask Randal> that you don't lie in that way. http://www.nntp.perl.org/group/perl.beginners/2009/08/msg108718.html Ian> I did NOT lie, nor did I mislead the list in anyway by supplying code that Ian>

Re: Nature of this list

2011-04-22 Thread Ian
Sadly the great work Casey West and Kevin Meltzer did by starting a perl beginners list was tainted by individuals like Randal Schwartz. I was a direct target of this bullying Randal is arrogant and a bully and is the reason why I moved on from this list years ago. Ian

Re: gifts w--) WARNING. MY ACCOUNT WAS HIJACKED!

2010-12-04 Thread Ian
My gmail account was hijacked from China! DO NOT FOLLOW THE LINK IN THE PREVIOUS EMAIL RECEIVED FROM THIS ADDRESS My Apologies. Google is aware of the problem

gifts w--)

2010-12-04 Thread Ian
hi, a few days ago, I purchased several Christmas gifts from a bussiness company, because all products in discount season, very affordable, you can go to brow: mobilesoso.com, if you find appropriate item, decorating your Christmas Days. c--) -- To unsubscribe, e-mail: beginners-unsubscr...@perl

Re: Dear friend!

2009-10-26 Thread Ian
On Mon, Oct 26, 2009 at 12:06 PM, Pat Rice wrote: > Dear friend,I am willing to give you a big surprise. > Friend, I'm willing to give you some good advice! use warnings; use strict; Read http://perldoc.perl.org/ Ian

Re: Mysql and storage

2009-10-09 Thread Ian
ing of the data > structures? Is there a good how to help page out there? > > Use the perl DBI. This page have a good starting tutorial. http://www.perl.com/pub/a/1999/10/DBI.html Ian

Re: Burnt Camel Club

2009-09-22 Thread Ian
On Tue, Sep 22, 2009 at 9:45 AM, jm wrote: > What's holly got to do with it, though? ;- > > > Argh! Yes I can't spell!!! :-O

Re: Burnt Camel Club

2009-09-22 Thread Ian
per day and other comparable language lists gets 40. Keep it up and the hollier-than-though's will have the list to themselves eventually. Ian

Re: Charter of perl.beginners

2009-09-21 Thread Ian
d day after day I see other newbies get almost the same treatment. To them I want to say: Hang in there, ignore the preaching posts and use the teaching posts. Ian

Re: Printing a hash of hashes of arrays

2009-08-27 Thread Ian
Thank you David, Jim, Uri.

Printing a hash of hashes of arrays

2009-08-27 Thread Ian
Pure beginners question. I'm creating a hash of arrays like this : $ihash{$3}{$1} = [...@itab]; For now I was able to get the data using Dumper but I need to create a "pretty" report. How do I loop over this hash/hash of arrays to print it out? Thank you. -- Ian

Re: Perl "expert"

2009-08-20 Thread Ian
ide an answer (right or wrong), but don't *lie* about your level > of > >confirmation for the result. > > Again, I tested the code, it worked. I did not lie. Because this thread, and others, are a direct results of my posting code I cannot help but take the replies personally. The cr

Re: Perl "expert"

2009-08-19 Thread Ian
llowed that rule, > life would be simpler. :) > In the post that started this discussion the rules as you specified them was satisfied. Andthe requesters problem was succesfully solved. >> Ian wrote : >> This is how I would do it. Also the code was tested, it run successfully and p

Re: A side note [was Re: Attentipn Please!! Need A Perl script to yada yada]

2009-08-19 Thread Ian
itch here and there. I don't use it for mission critical applications. I'm hoping to change that going forward. Good luck. Ian

Re: A side note [was Re: Attentipn Please!! Need A Perl script to yada yada]

2009-08-18 Thread Ian
>>telemachus >One other thing worth saying: Ian seems to me to display the habit that a >lot of first-time (or rare) posters do of over-apologizing for an answer. I >do it myself here and on other forums, and I see it in my students all the >time. It's a pretty natura

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Ian
. It will greatly improve their readability. Regards Ian

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Ian
. At the moment I'm struggling myself with a piece of data I cannot get parsed!!! Good luck Ian On Mon, Aug 17, 2009 at 2:12 PM, Jyotishmaan Ray wrote: > > Thanks, a lot can you do this too. > > If the input file is as the file enclosed, I need the uids gien in this > fil

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Ian
$line =~ /^dn:\s+uid=(s\d{2}-\d{1}-\d{1}-\d{1,3})/) { print UIDF ("$1\n"); } } close (DATA, UIDF); END; __ Good luck Ian On Mon, Aug 17, 2009 at 12:34 PM, Jyotishmaan Ray wrote: > Please send me your perl script

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Ian
chomp($line); > > } > } > } > > } > print Dumper(%idhash), "\n"; > > while ( (my $snum, my $sid) = each(%idhash) ) { > print "Student = $snum\tuidNumber = $sid\n"; > } > > END; > Thanks I

Re: Need some advice on learning perl

2009-08-10 Thread Ian
ended up writing an application that collects statistics, put them in MySQL and show me nice graphs. When you have a goal, it is easier to learn to use the tools to achieve the goal. If this old mainframer can learn perl you will have no problem with it ;-) Good luck Ian

Hello

2006-09-21 Thread Ian Macdonald
appreciated All the best Ian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Regex to do ///?

2004-07-26 Thread Ian Marlier
Hi, all -- I've got another RegEx question, a follow-up to one that I asked earlier today: Given a string that looks like this: "This is a (string of words) that go together" I need to turn it into this: "This is a (stringofwords) that go together" Which is to say, I need to match one set of ch

Re: A RegEx question

2004-07-26 Thread Ian Marlier
> Ian Marlier wrote: >> Hi, all -- > > Howdy, > >> I'm in the process of writing a script to migrate from one wiki package to >> another. >> >> The old wiki help articles in a series of flat text files. The new one >> holds everything in M

A RegEx question

2004-07-26 Thread Ian Marlier
((http://someurl.com/|Text That Links)) Replacing the individual characters is easy. But how can I grab the "link" and "text" parts out (IF there is a "|" in the middle), and reverse them? Any help appreciated. Thanks, Ian -- To unsubscribe, e-mail: [EMAIL

Re: connecting to mysql for the first time

2003-10-31 Thread Ian Morton
A really quick intro and tutorial into MYSQL access via Perl is in the "MYSQL weekend crash course" a book by Jay Greenspan published by Hungry Minds. I bought it and found it to be a great intro to Mysql and Perl DB access in general. hope this helps, Ian. On Friday 31 Oct 20

Feeling a bit 'trapped' by Net::SNMP

2002-12-23 Thread Ian Zapczynski
Hello all, I hope my question isn't too specific for this list. I'm still learning the basic concepts of SNMP, but I need my current script to send an SNMP trap to a host here upon failure. I am hoping to use Net::SNMP to do so, but I think I'm unclear of the syntax due to my current lack of

Re: how to use alarm() to properly time out a connection?

2002-12-20 Thread Ian Zapczynski
Jose, Yes, you are correct. I did not know about placing the alarm prior to the hanging condition (gee, I guess that makes sense) or clearing the alarm afterwards. Thank you! -Ian NYIMI Jose (BMB) wrote: -Original Message- From: Ian Zapczynski [mailto:[EMAIL PROTECTED]] Sent

how to use alarm() to properly time out a connection?

2002-12-20 Thread Ian Zapczynski
Hello all, I need to use alarm to time out a connection to an SFTP server if the connection hangs (I was able to reproduce such a hang using the Secure Shell Server for Windows, so I thought it would be nice if my script assumed this was a possibility). I think I am not understanding the perld

RESOLVED: Net::SFTP causes script to exit if connection can't be made

2002-12-13 Thread Ian Zapczynski
; if (!$sftp) { print "I can't connect!"; } else { print "SUCCESS!"; } - Original Message - From: "Ian Zapczynski" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 12, 2002 4:51 PM Subject: Net::SFTP causes sc

Re: More on Net::SFTP causes script to exit if connection can't be made

2002-12-13 Thread Ian Zapczynski
.1/Net/SSH/Perl.pm line 206. Is there just no way to avoid a die() if called? Thanks again, -Ian Mark Goland wrote: how about #/usr/bin/perl -w use strict; use Net::SFTP; my ($sftp) = Net::SFTP->new("10.25.3.150", user=>"administrator", password=>"

Re: Net::SFTP causes script to exit if connection can't be made

2002-12-13 Thread Ian Zapczynski
TP->new("10.25.3.150", user=>"administrator", password=>"suite100") || warn "connection failed $!"; if (!$sftp) { print "I can't connect!"; } else { print "SUCCESS!"; } - Original Message -

Net::SFTP causes script to exit if connection can't be made

2002-12-12 Thread Ian Zapczynski
All, I just pulled down the latest Net::SFTP from CPAN and am using it w/ Perl 5.6.1. I've used the module before and don't *think* I've seen this problem, but I can't say for sure and have only one machine to test it on. What happens is that if an SFTP connection is refused to the specified

Re: populating a hash key using a variable

2002-12-11 Thread Ian Zapczynski
se that key was undefined. Geez. Precisely why I'm still on the "beginners" list. :) Thanks James and Rob for helping me find that my error was not in syntax. -I Rob Dixon wrote: Quite. What you've written looks fine Ian. But you've probably shown us what you /meant

Re: populating a hash key using a variable

2002-12-11 Thread Ian Zapczynski
I am not populating from a file, actually. I'm populating from the output of $sth->fetch from DBI. The $something and $something_else variables in this case are numbers which have been defined by the output of that method. If I do $hash{SOMETHING}{0} = $something; Then my hash is populated

populating a hash key using a variable

2002-12-11 Thread Ian Zapczynski
Hello all, I'm obviously making a silly mistake here and would appreciate it if someone can point out my error. I am trying to populate a hash of a hash in a while() loop. Here is what I have: my $i = 0; my %hash = (); while () { $hash{SOMETHING}{$i} = $something; $hash{SOMETH

moving a large hash to a library and using data from args to populate it

2002-12-03 Thread Ian Zapczynski
a library/module AND still use the arguments to my perl script to populate it? I thought of moving my hash to a subroutine to do so, but then I lose my nifty way of referencing the data by means like $MyModule::dbstuff{$key}[0]{tag}, no? Any ideas or criticisms are certainly welcome. -Ian

RE: Extracting text from a phrase

2002-09-17 Thread Ian
her application, which happens to be a news ticker. Thanks again for your help. Ian > Why not try grabbing all the important stuff right out of the > pattern, > like my example below. Note: Your pattern may need changes if I > assumed too much, from your examples. > > #!

Extracting text from a phrase

2002-09-17 Thread Ian
both $headline and $url are the same at the moment, but having tried various alternatives, I am just getting more and more confused. Any assistance would be gratefully received. Ian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Managing user ID and password

2002-08-15 Thread Hammill, Ian R
hich seems less than ideal because of security implications. Can anyone offer any helpful advice? BTW Apologies for the disclaimer below, not my choice I'm afraid. Thanks in advance Ian " Thi

Re: add_delta_workdays from Date::Calendar not returning what I'dexpect

2002-08-12 Thread Ian Zapczynski
7 and Monday being day 1 be the culprit? It seems to me this module works on the actual *date* as it exists on the Gregorian calendar, and not so much the day of the week. Am I wrong? -Ian Nikola Janceski wrote: > > just ran your script as is.. and the date is fine for me > > output: &

add_delta_workdays from Date::Calendar not returning what I'd expect

2002-08-12 Thread Ian Zapczynski
ould be something in my environment. Thanks!! -Ian - #!/usr/bin/perl # use strict; use Date::Calc qw(:all); use Date::Calendar; use Date::Calendar::Profiles qw( $Profiles ); my ($year,$month,$day) = Date::Calc->Today(); # figure out what day yesterday was so we can determine if it matche

trouble comparing dates from two different modules

2002-07-24 Thread Ian Zapczynski
Hello all, I am using add_delta_workdays() from Date::Calendar to determine whether yesterday was or was not a business day. In order to do this, I am trying to compare it with a date output from Add_Delta_Days from Date::Calc. What I'd *like* to do is stringify the output from both of these fu

trouble comparing dates from two different modules

2002-07-24 Thread Ian Zapczynski
Hello all, I am using add_delta_workdays() from Date::Calendar to determine whether yesterday was or was not a business day. In order to do this, I am trying to compare it with a date output from Add_Delta_Days from Date::Calc. What I'd *like* to do is stringify the output from both of these fu

Re: Shift

2002-07-16 Thread Ian Harisay
THat depends on the context of its use. in a subroutine this would take the first element from @_. >>> "Adriano Sastre Vieira" <[EMAIL PROTECTED]> 07/16/02 10:54AM >>> What does the following instruction means? That is, when my variable receives shift, what is it? my $MENUI = shift; Thanks

Re: How to pass the value of $@ to a subroutine

2002-07-03 Thread Ian Zapczynski
Thanks! Changing: my $message = @_; to: my ($message) = @_; did put the correct value in the string. If anyone cares to explain the difference between the code I had and the code Shishir suggested so I can understand why this makes a difference, I'm all ears! Thanks again, -Ian "

How to pass the value of $@ to a subroutine

2002-07-03 Thread Ian Zapczynski
xample? I'm assuming it's not a string as I thought. I can just assign the value of $@ to a string and pass that to my sub, but of course that won't teach me anything. :) Thanks much! -Ian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Win32::Service on UNIX?

2002-05-31 Thread Ian Samuel
Title: Win32::Service on UNIX? Hello, Is there any equivalent for Win32::Service on Unix? That is, a way for a Unix box running Perl to get information about the state of another machine's Win32 services? TIA, Ian Samuel -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

RE: Need help in Regular Expression

2002-05-24 Thread Ian Samuel
Title: RE: Need help in Regular Expression Ankit: $header = $1 if /^Date: (.*)/; This should do what you want. Regards, Ian Samuel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 10:14 AM To: [EMAIL PROTECTED] Subject: Need help

ifconfig and too many pppd's

2002-02-19 Thread Ian McKenna
ite a PERL script that simply list the pppd from ifconfig so it list all the pppds like this ppp1 ppp2 ppp3 .. .. .. ppp21 I want ppp1 kelt up and all the rest killed off - anyone know how I can do this ? Regs Ian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: Passing an array from a 2-D array

2002-02-16 Thread Ian P . Thomas
On Thursday, February 14, 2002, at 08:12 PM, Michael Fowler wrote: > On Thu, Feb 14, 2002 at 04:14:39PM -0500, Ian P. Thomas wrote: >> >> # The array, unchecked_dfa_states, is going to be an array of arrays >> ( 2-D ). >> # dfa_state_creation is a subroutine that

Passing an array from a 2-D array

2002-02-14 Thread Ian P . Thomas
eeded, I can post or explain more code. Ian P. Thomas Of course it runs NetBSD www.netbsd.org _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: wondering what might be causing this error

2002-02-11 Thread Ian Christie
> >>Roger, thanks for the suggestion about the permissions, it didn't help, >>but was worth a try. I think it's supposed to be at least 711 so everyone >>can execute it. >> >> >> >>At 03:58 PM 11/02/02 -0800, you wrote: >> >>>Le

Re: wondering what might be causing this error

2002-02-11 Thread Ian Christie
0, you wrote: >Let's see the first 3-4 lines of the script.. > >Agustin Rivera >Webmaster, Pollstar.com >http://www.pollstar.com > > > >- Original Message - >From: "Ian Christie" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent

string manipulation

2002-01-26 Thread Hubert Ian M. Tabug
Hi, Given the string $a = "xxx xxx xxx xxx xxx xxx xxx (Jan 12 1990 ..)", I wan't to selectively extract that part of the string having the (Jan 12 1990 ...) and store it in an array. Can someone guide me? Thanks, Hubert

Adding quotes to a string variable

2002-01-07 Thread Hubert Ian M. Tabug
Hello, I have a variable say $a = "Test Test Test" whose contents when printed out is Test Test Test. I want the said variable to have the quotes appended, meaning it will print out "Test Test Test" and the variable will contain the quotes as well. Is that possible? You help would be gre

Calling a perl script with a perl script

2002-01-03 Thread Hubert Ian M. Tabug
Hi, Given that I have a perl script main.pl, and I want main.pl to "use/call" the script testprog.pl, and store testprog.pl's output into a variable that can be used within main.pl. How do I go about doing it? Your help would be greatly appreciated. Thanks, Hubert

STDIN Formating

2002-01-03 Thread Hubert Ian M. Tabug
Hello, Say I have I loop while () { print .. } Is there a way for me to format whatever values/text are in STDIN so that I can ju

Line Parsing/Splitting

2002-01-01 Thread Hubert Ian M. Tabug
Hello, Given that $a = `1234 abcde abdcd acbd`; Would anyone know of of a way for me to just "extract" the numerical portion of the string. The numerical part is not fixed in length it could be composed4, 3, 2 or 1 digit I was thinking that the string could be tr

output redirection

2002-01-01 Thread Hubert Ian M. Tabug
Hello, Has anyone ever tried toying or configuring fping and parsing its output via perl? The reason why I am asking this question is that, I am trying to capture the output generated by the command fping -s, what fping -s does is that it generates a summary output upon exit, I have t

Mod_perl insight

2001-12-10 Thread Ian Zapczynski
make use of mod_perl. Is it as simple, for example, as calling specific modules at the start of each script, or is there much I have to consider when writing my new programs? URL suggestions are certainly welcome. Thanks, -Ian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

RE: wanted help in Selection of User Interface

2001-10-26 Thread Mitchell, Ian
able of supporting X (old PC's, dumb terminals, etc), use a character based browser like Lynx. Whenever I write Web apps, I always try to design them to be "usable" via a text based browser. In fact, as long as you keep things simple (read: no bells or whistles where they don'

installing modules under Window 2000

2001-06-02 Thread Ian Cheung
s the html and cgi files. In the scripts I used use lib '/directory_module_installed_to' ; Is it possible to work around the fact that I don't have command line access on the Windows 2000 server? Many thanks Ian

RE: append a file to another file - delete

2001-06-01 Thread Mitchell, Ian
le at 11:59 when you run this. There is "flock" command but I think it only works if all other programs cooperate. Again I'm a bit green with Perl so there is probably and alternate/better way. Ian D. Mitchell System Consultant Applications Development & Support Corporate Infor