Re: To export or not to export?

2003-06-25 Thread b
ge. However once you made the "trace" function available for export via Exporter and the EXPORT_OK array a "use Trace qw(trace)" brings that function into the "main" namespace and thus perl can see the function. Cheers! |b On Wed, 2003-06-25 at 19:39, Ro

perl GUI

2001-08-19 Thread b g
Hi list ! Is there free perl GUI for Linux (like KDEvelop) and where can I get it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

perl_run question

2001-05-05 Thread shrini B
Hi I am working on calling perl program from my c program. I have the perl file name in argv[1]. I want the output in the buffer. How do i intercept the output of perl_run function which is going to STDOUT so that it comes to the buffer instead. Any help would be greatly appreciated. Please reply

inetd client server communications

2002-01-18 Thread henk b
I'm trying to make an inetd perl server to communicate with a perl client. Communication from client to server is working but not from server to client. As I understand inetd handles the socket, bind, listen and accept stuff and basically you can communicate between server and client using STD

Authorize.net Error

2009-05-16 Thread sheela b
Hi All, I have shopping cart website integrating with authorize.net for Payment gateway. Authorize.net is working fine in test mode, but in the live mode, i am not able to give any credits to customer. It displays following error message. "The referenced transaction does not meet the criteria

Re: evaluate for max and min value in array

2009-07-22 Thread sheela b
Hi Jenn, You can fing max and min value as, my @ar = (1,2,3,4,58,9,2,1); my $max = (sort { $b <=> $a } @ar)[0]; my $min = (sort { $a <=> $b } @ar)[0]; Regards Sheela On Wed, Jul 22, 2009 at 12:48 PM, Jenn G. wrote: > Hello, > > How to lookup the max and min value in

Deleting last 10 lines of a file

2010-03-23 Thread sheela b
Hi All, How to delete last 10 lines of a file using Perl one liner? I used the following one liner to delete first 10 lines of a file, perl -i.bak -ne 'print unless 1..10' test.txt Regards Sheela

Re: Deleting last 10 lines of a file

2010-03-24 Thread sheela b
Thanks a lot Shlomi and Thomas. I will try with these methods. On Tue, Mar 23, 2010 at 7:13 PM, Shlomi Fish wrote: > Hi Sheela, > > On Tuesday 23 Mar 2010 15:06:24 sheela b wrote: > > Hi All, > > > > How to delete last 10 lines of a file using Perl one liner? >

First perl program

2008-06-18 Thread Jason B
I'm really new to programming and this is my first perl prog. I'm looking for any advice or comments on this script. (I don't want to develop bad habits from the start) Thx. #!/usr/bin/perl #Name:circumf #Date:Jun19/08 #Author:Bornhoft, J #Purpose:to calculate the circumference of a circle pr

fetching to docs using wget

2008-07-22 Thread a b
r-- 1 adave aix 254 2008-07-22 17:48 fetch.pl -rw-r--r-- 1 adave aix 4074 2008-07-22 16:52 source.txt -rw-r--r-- 1 adave aix0 2008-07-22 18:03 overview.ppt Thanks, a b

Redirect option

2008-10-16 Thread sheela b
Is there any option to redirect a URL in perl other than Location ? Regards Sheela

Need Help

2008-11-16 Thread a b
Hi , Can any body tells me what do we mean by below code $ROUTE::COMM{NEWROUTE}{OS()} Thanks in Advance a b .

very basic questions

2009-01-28 Thread b chen
i am completely new to perl, can you explain to me the following line of code in red. how does this line of code grab a time value and assign it to $ time, how does assigment happend in this conditiona statement. while (<>) { chop; # Grab the time next unless ($time) = /(\d+:\d+:\d+\,\d+)/;

Problem using require()

2004-03-14 Thread B. Fongo
I have several modules which needs global variables from a text file (global.txt). Within each module, I use require "global.txt" to get my variables. global.txt $shop =

AW: Problem using require()

2004-03-15 Thread B. Fongo
codes. What I don't understand - is why my scripts get only the first variable in the config file, but fail on the rest. Babs -Ursprüngliche Nachricht- Von: Randy W. Sims [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 14. März 2004 19:07 An: B. Fongo Cc: [EMAIL PROTECTED] Betreff: R

AW: AW: Problem using require()

2004-03-15 Thread B. Fongo
I've checked cpan AppConfig. I may get back to it. Thanks Randy -Ursprüngliche Nachricht- Von: Randy W. Sims [mailto:[EMAIL PROTECTED] Gesendet: Montag, 15. März 2004 12:36 An: B. Fongo Cc: [EMAIL PROTECTED] Betreff: Re: AW: Problem using require() On 03/15/04 06:19, B. Fongo

AW: returning hashes, and arrays

2004-03-17 Thread B. Fongo
That should work provided you're returning only on list. It is much better to use reference when passing or retrieving more than one value. For instance: Retrieve the values from a sub as refereces. ($xRef, $yRef, $zRef) = example(); # my @x = @$x; my @y = @$y; my $z = $$z; sub example {

Perl from Terminal in OSX

2004-03-18 Thread B McKee
From: David Gilden <[EMAIL PROTECTED]> Date: Thu Mar 18, 2004 12:27:57 PM Canada/Eastern To: [EMAIL PROTECTED] Subject: running PERL from CMD line OSX Trying to run a perl script in OSX shell, and It is not working, what am I missing? here is what I am typing: perl -e test.pl #!/usr/bin/perl #

use lib

2004-03-23 Thread B. Fongo
Is it recommendable to use the pragma "use lib " when installing a program on a server shared by many users? Assuming my IPS did not install certain CPAN modules which my needs, and I decide to install them in my www directory. In such a scenario, putting "use lib" on my scripts will add my modu

Fwd: Apache::Session question

2004-03-25 Thread B. Fongo
My implementation of Apache::Session::MySQL dies along the way, and gives unclear warning. [error] Died at /usr/lib/perl5/site_perl/5.8.0/Apache/Session/Generate/MD5.pm line 40. I decided to implement session as a module call Store::Session, so as to minimize recoding it in many script. Babs

Parsing the hyperlink?

2004-03-29 Thread Ron B
I'm running my own version of bulletinboard and I have a little problem with hyperlinks. I'd like to make them really work. So if posted message includes http://blaablaablaa it would be a hyeprlink when reader opens the message. Messages are stored in .html files so it's quite easy to add http:

Re: Parsing the hyperlink?

2004-03-30 Thread Ron B
Thanks. I think I'll use regex this time, 'cause it fits the purpose good enough. But it's really nice thing to know the module for the future versions of my script. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Regex to match domain for cookie

2004-04-15 Thread B. Fongo
How do I match a domain name starting from the dot? # Match something like these ".domain4you.co.uk" ".domain-house.de" This is what I have: @domains = ("http://www.domain.com ", "http://www.domain4you.co.uk "http://www.domain-house.de"; "https//rrp.cash-day.com" ); f

AW: Regex to match domain for cookie

2004-04-15 Thread B. Fongo
of "www.domain4you.com", "www" will be truncated isn't it? $name =~ s/^[^\.]+//; I hope I got the logic right. Thanks Babs -Ursprüngliche Nachricht- Von: Hanson, Rob [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 16. April 2004 01:36 An: 'B. Fongo&#

How do I make a variable globally accessible without vars

2004-04-16 Thread B. Fongo
I get the usual warning "Use of uninitialized ." while trying to test a variable ($counter) which is initialized later in my script. Using the pragma use vars ($counter) makes it sticky. To avoid, I tried to work around it by passing it to a sub. my $counter = counter(); if ($counter ==

What exactly is this simple regex doing?

2004-04-16 Thread B. Fongo
7;m not pulling anyone's leg. So just explain it if you can. (.domain4you.com from http:://www. domain4you.com.) foreach (@domains) { my $name = $_; $name =~ s/^[^\.]+//; print $name; } -Original Message- From: B. Fongo [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 200

RE: What exactly is this simple regex doing?

2004-04-16 Thread B. Fongo
a special qualifier. Oh! How I wish I could understand it. :-) I think I need to go back to learn some more regexs. ||> -Original Message- ||> From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] ||> Sent: Friday, April 16, 2004 5:40 PM ||> To: B. Fongo; [EMAIL PROTECTED] ||>

RE: How do I make a variable globally accessible without vars

2004-04-17 Thread B. Fongo
my $counter = shift; return(my $counter) = shift; } 1; ||> -Original Message- ||> From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] ||> Sent: Saturday, April 17, 2004 2:35 AM ||> To: 'B. Fongo'; [EMAIL PROTECTED] ||> Subject: RE: How do I make a

RE: Perl File Uploading

2004-04-20 Thread B. Fongo
Create a form for upload (you may also use CGI.pm to create the form) like this: myperl.pl use CGI (:standard); my $file = param("file_to_upload"); my $destination = "any_name.txt"; # Open a file handle to write the upload file. Open (FH, ">/path/$destination"); while (<$file

FW: Perl File Uploading

2004-04-20 Thread B. Fongo
Create a form for upload (you may also use CGI.pm to create the form) like this: myperl.pl use CGI (:standard); my $file = param("file_to_upload"); my $destination = "any_name.txt"; # Open a file handle to write the upload file. Open (FH, ">/path/$destination"); while (<$file>)

Re: Perl vs PHP

2004-04-22 Thread Ron B
Why would one prefer Pepsi over Coke, or vice versa? :) That's the answer to your question. [EMAIL PROTECTED] wrote: Why would one prefer PHP over PERL, or vice, versa? I'm guessing PERL has more functionaltiy and is more robust. What are the technical arguments for one over the other? JP -

Comments on this suggestion

2004-04-27 Thread B McKee
I tripped over this chunk of code today - #!/usr/bin/perl -w BEGIN { use File::Basename; unshift @INC, dirname($0); } use strict; use module_whatever; ... if I'm reading this right it would let you include a required module your users may or may not have with your own script. No

How do I best redistribution cpan modules?

2004-05-03 Thread B. Fongo
My program depends on some CPAN modules (e.g. Image::Magick, MD5::Digest) to operate, so I want to distribute it with those modules. How do I best redistribute module? Regard Babs

RE: Perl on Apache

2004-05-04 Thread B. Fongo
It is probably because you didn't instruct the browser well. Add this at the top of your script: print "Content-type: text/html\n\n"; or if you're using CGI.pm this: print header (-type => 'text/html'); ||> -Original Message- ||> From: Sumanth Sharma [mail

RE: Perl on Apache

2004-05-04 Thread B. Fongo
It is probably because you didn't instruct the browser well. Add this at the top of your script: print "Content-type: text/html\n\n"; or if you're using CGI.pm this: print header (-type => 'text/html'); ||> -Original Message- ||> From: Sumanth Sharma [mail

RE: How do i call a module !

2004-05-05 Thread B. Fongo
Read the docs of the module or the source to find out which functions it exports by default, and which you have to import explicitly. So if a module is Bar::Foo and exports 2 functions (fistfunc, secondfunc), then you can use them by Saying: Use Bar::Foo; Firstfunc(); # Referring to the first f

RE: Simple DBI question

2004-05-05 Thread B. Fongo
Assuming you've established a connection... @result = $dbh->selectrow_array("SELECT DISTINCT column1 FROM table WHERE column2= -1"); $dbh->disconnect; This should do... Babs ||> -Original Message- ||> From: McMahon, Chris [mailto:[EMAIL PROTECTED] ||> Sent: Wednesday, May 05, 2004 12:4

RE: A cookie is not stored

2004-05-05 Thread B. Fongo
$returnpage = $ENV{HTTP_REFERER}; # Not all Browser send this value, so test to see whether $returnpage is defined. If not, then you may have to assign a value to it like: $returnpage = "origin.pl"; $cook_admin = $cgi_this->cookie(-name=>'admin', -value=>$value1); $cook_session = $cgi_this->c

Default FTP agent for CPAN

2004-05-06 Thread B McKee
CPAN wants to use Net::FTP but it doesn't work behind our corporate firewall. Ncftp or wget works fine, once the endless timeout wait is over. I found this on a perl list, but it's not working for me. I'm using perl 5.6 on OSX. Suggestions? With perl 5.8 having libnet as standard and the generall

Net::SNMP session creating problem

2004-09-06 Thread Geetha B
Hi , I'm using NET::SNMP perl package to send do SNMP operations. This requires establishing snmp session. upon calling create session , I'm getting error "ERROR: Unknown error creating socket." The code which gives the above error is given below. *

Re: Net::SNMP session creating problem : develop this as a pakage file

2004-09-08 Thread Geetha B
) SNMPgetResult = $snmpInstance->snmpget(arguments) Please do guide Thanks, Geetha On Tue, 2004-09-07 at 19:50, Chris Devers wrote: > On Tue, 7 Sep 2004, Geetha B wrote: > > > ($session, $error) = Net::SNMP->session( > > -hostname => shift || 'loc

replacing multiple matches with an array

2005-01-17 Thread B McKee
Hi All I have this bit of code in a program I'm working on. while () { next if /\f/ ; next if /^DATE : / ; next if /^\s{15,}PART / ; next if /^COUNTER QTY/ ; next if /^\s+$/ ; print ; # debugging purpo

Re: beginners Digest 18 Jan 2005 12:52:35 -0000 Issue 2433

2005-01-18 Thread B McKee
Apologies for the layout and busted thread - I'm on digest mode From: "JupiterHost.Net" <[EMAIL PROTECTED]> I believe this will do what you want: next if grep { $rawreport_item =~ /$_/ } @possibleMatches; Just make sure the regexes in @possibleMatches are not user supplied or they may try sneaky

Scope issue

2005-01-19 Thread B McKee
Hi All I seem to have a problem with scope and/or handling objects here. If I use 'my worksheet = $workbook->add_worksheet("$branchNumber") or die "Couldn't add worksheet $branchNumber \n" ;' then I get 'use of uninitialized variable' when I try to add to the worksheet outside the innermost if {

RSS feed to perl

2005-04-18 Thread Ron B
Please, tell me an easy way to put rss-feed to my home site. Ok, I know, there's zillions ready made php and perl scripts to do that, but is there an easy way to do it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

nice regular expression

2006-10-12 Thread I . B .
Hi folks, i have a task to verify that word "Bug" is in the table in the 3rd row from the buttom, i came up with regex , but it doesnt work. can anyone please take a look? #/usr/bin/perl -w my $line = "\nA\nBug\nC\nD\n"; print "3 matches: $1\n" if ($line =~ /(.+Bug[^()]+<\/tr>)\s*(.+<\/tr>\s+)

Re: nice regular expression

2006-10-13 Thread I . B .
thank you for reponse! unfortunately I have to use regex to solve this problem. I was trying to simplify: $file=~/.+Bug.+<\/tr>\s*.+<\/tr>\s*.+?<\/tr>\s*.+?<\/tr>\s*<\/table>/; still does not work!!! On 10/12/06, Dr.Ruud <[EMAIL PROTECTED]> wrote:

Re: nice regular expression

2006-10-13 Thread I . B .
matches my string "Bug some word" in both file1.txt and file2.txt, should only match file1.txt frustrated! what is wrong here? thank you! On 10/13/06, I. B. <[EMAIL PROTECTED]> wrote: thank you for reponse! unfortunately I have to use regex to solve this problem. I was trying

grouppin in the regular expressions

2006-10-13 Thread I . B .
Hi nice people, how to specify using regular expressions: match everything but string (xxx) i would do this : $line =~ /[^(xxx)]+/; but, as it was mentioned before () inside character class is not working. what is solution here? thank you! ~i

Re: nice regular expression

2006-10-13 Thread I . B .
got it! very nice, not complicated at all. I didn't know about lookahead feature. very useful. this file that should be matched: row 1 row 2 row 3 Bug some word row 4 row 5 this is file that should not be matched: row 1 row 2 row 3 Bug some word row 4 row 5 row 6 this is soluti

Re: grouppin in the regular expressions

2006-10-13 Thread I . B .
sorry, I didn't fraze my question correctly. example : $line="abcxabcxxabcxxxabc"; how to match everything beofre "xxx" but not xxx itself? the answer i got is to use lookaheads: my $line = "abcxxabcxxxabc"; if ($line =~ m{(.*?(?:(?!xxx).))xxx}){ print "matched: $1\n"; } else{ print "f

Re: nice regular expression

2006-10-14 Thread I . B .
this community, I found solution using help of my former colleague and I posted it here for others interested individuals to see. It is all about exercising skills. And having fun. ;) On 14 Oct 2006 10:13:16 -0700, Randal L. Schwartz wrote: >>>>> "I" == I B <[

Re: grouppin in the regular expressions

2006-10-15 Thread I . B .
right, what was i thinking? thank you. On 10/13/06, John W. Krahn <[EMAIL PROTECTED]> wrote: I.B. wrote: > sorry, I didn't fraze my question correctly. ^ phrase > example : > $line="abcxabcxxabcxxxabc"; > > how to match everything beofre "xxx" but not xx

Re: reg exp

2006-12-12 Thread I . B .
or just: my $filename="/home/dbsmith/passwd.duby02.linux"; my ($pass,$hostname,$platform)=split /\./, $filename; ~i On 12/12/06, Lawrence Statton XE2/N1GAK <[EMAIL PROTECTED]> wrote: If you're dealing with variable length strings, separated by some kind of character, then regexp is the tool

Re: simple perl script on Windows

2007-01-18 Thread I . B .
also keep open and close outside the loop. you overwriting previously written lines. open FILE2,"$file"; foreach @lines { print FILE2 $_; } close FILE2 cheers On 1/18/07, Mathew <[EMAIL PROTECTED]> wrote: Thanks. That likely will help. However, I still can't even get it to perform any action

Re: Selective splits... (treat this "pattern" as a delimiter only if it is followed by this "pattern")

2007-01-19 Thread I . B .
you can use lookaheads: my @matched = split /\s+(?=\w+=)/,$string; cheers, ~i On 1/19/07, Michael Alipio <[EMAIL PROTECTED]> wrote: Hi, Suppose I have: my $string = 'Jan 19 11:37:21 firewall date=2007-01-19 time=11:42:15 devname=TESTfirewall device_id=FGT-602905503304 log_id=0104032006 ty

Re: character classes vs regexp alternatives (using "( )" or "[ ]"

2007-01-19 Thread I . B .
[,|\s+] - means one of the following characters: , or | or \s or + (,|\s+) - means "," or "\s+" , but yeas alternation will match $2 in : ~ /date=(\S+?)(\s+|,)/; On 1/19/07, Michael Alipio <[EMAIL PROTECTED]> wrote: Hi, I'm a bit confused here: I have a regexp: ($date) = $log =~ /dat

Re: Selective splits... (treat this "pattern" as a delimiter only if it is followed by this "pattern")

2007-01-19 Thread I . B .
substitute "\s" with "*" to make split easier sounds like a very bad idea. didn't see people doing that in perl. problem is solved, why do you add extra complexity? On 1/19/07, Michael Alipio <[EMAIL PROTECTED]> wrote: - Original Message From: I.B. <[EMAIL PROTECTED]> To: begginers p

Re: Alternative lookaheads in substitution, is it possible? (SOLVED!!!)

2007-01-20 Thread I . B .
one more to remove spaces selectively: $string =~ s/(\s+)(?:(?!date=|time=)(?=\w+=))/*/g; cheers, ~i On 1/20/07, Mumia W. <[EMAIL PROTECTED]> wrote: On 01/20/2007 06:46 AM, Michael Alipio wrote: > Cool > > I got this from approximately 71% perldoc perlre: > > print "5: got $1\n" if $

module installation problem

2007-04-24 Thread I . B .
Hi people, I installed module Net::Ftp::Recursive. All following steps succeeded: perl Makefile.PL make make test make install # next i tested if module loading correctly ~$ perl -MNet::Ftp::Recursive -e "1;" Can't locate Net/Ftp/Recursive.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl

Re: module installation problem

2007-04-24 Thread I . B .
I will try to reproduce this again. I am sure it was Net::FTP::Recursive thank you for response ~igy On 4/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, I think that you have a little mistake Run perl -MNet::FTP::Recursive -e "1;" instead of perl -MNet::Ftp::Recursive -e "1;". Yo

Re: Perl Threads

2010-10-14 Thread a b
Thanks a lot All of your On Wed, Oct 13, 2010 at 6:21 AM, Brian Fraser wrote: > The usual elevator example: > http://www.perl.com/pub/2002/09/04/threads.html > > I'm not entirely sure if the article is dated (I used it a couple of months > back as a personal introduction to threads in general, f

Print FH to file.

2010-10-23 Thread KA B
I`m trying to get the filehandler 1 and 2 to print the result in one line. The script i have made makes 2 lines. The script goes like this: my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime; $year += 1900; $mon += 1; open FH,"echo $year-$mon-$yday $hour:$min >> /home/me/script

Re: Print FH to file.

2010-10-25 Thread KA B
On Oct 23, 6:45 pm, shlo...@iglu.org.il (Shlomi Fish) wrote: > Hi KA B, > > On Friday 22 October 2010 21:12:29 KA B wrote: > > > I`m trying to get the filehandler 1 and 2 to print the result in one > > line. > > It's filehandles - not filehandlers. > &g

Reading a value from a hash using a variable for the key

2011-01-20 Thread Eyal B.
I'm writing a scripts that check the TTL of the ping and found the OS. According the TTL - the script should let me know which OS it is : Linux/ Windows or Unix (Hash table) I'm getting an error on the line where I should use the TTL variable - and take the right value from the hash (%list) :Use o

Re: Reading a value from a hash using a variable for the key

2011-01-21 Thread Eyal B.
Tried to implement your recommendations step by step . #! C:\Perl\bin\perl use strict; use warnings; my %list = (60=>"linux",61=>"linux",62=>"linux",63=>"linux", 64=>"linux",65=>"linux",125=>"Windows",126=>"Windows",127=>"Windows", 128=>"Windows",250=>"Unix",251=>"Unix",252=>"Unix",253=>

Re: Reading a value from a hash using a variable for the key

2011-01-21 Thread Eyal B.
On Jan 21, 7:50 am, moonb...@gmail.com (Erez Schatz) wrote: > On 20 January 2011 15:38, Eyal B. wrote: > > > > > I'm writing a scripts that check the TTL of the ping and found the OS. > > According the TTL - the script should let me know which OS it is : > >

Re: Reading a value from a hash using a variable for the key

2011-01-23 Thread Eyal B.
On Jan 21, 4:30 pm, rob.di...@gmx.com (Rob Dixon) wrote: > On 21/01/2011 05:50, Erez Schatz wrote: > > > > > On 20 January 2011 15:38, Eyal B.  wrote: > > >> I'm getting an error on the line where I should use the TTL variable - > >> and take t

Re: Reading a value from a hash using a variable for the key

2011-01-24 Thread Eyal B.
If so, how print "TTL = $line\n" does give me the right value ! (I get TTL = 125 if ping to Windows machine. Thanks, for your answers. On Jan 21, 4:30 pm, rob.di...@gmx.com (Rob Dixon) wrote: > On 21/01/2011 05:50, Erez Schatz wrote: > > > > > On 20 Januar

Re: Reading a value from a hash using a variable for the key

2011-01-24 Thread Eyal B.
On Jan 21, 11:42 pm, ewinst...@gmail.com ("Eyal B.") wrote: > On Jan 21, 4:30 pm, rob.di...@gmx.com (Rob Dixon) wrote: > > > > > On 21/01/2011 05:50, Erez Schatz wrote: > > > > On 20 January 2011 15:38, Eyal B.  wrote: > > > >> I'm gett

custom module and lib

2011-01-30 Thread a b
Hello All, I have a query regarding using lib modules 1) I've some custom modules which uses various default routines like "Net::rsh" etc Now, i want to pack all default routines into my lib and use that lib in my custom modules i.e package MyModule; use lib "lib/test";(here i am placing my Rsh

Re: custom module and lib

2011-01-31 Thread a b
my lib :0 help much appeciated!!! Regards, a b On Sun, Jan 30, 2011 at 9:07 PM, Rob Dixon wrote: > On 30/01/2011 14:09, a b wrote: > >> >> I have a query regarding using lib modules >> >> 1) I've some custom modules which uses various default routines like &g

Re: custom module and lib

2011-02-03 Thread a b
Thanks a lot all for your views!! i got my solution Regards, a b On Mon, Jan 31, 2011 at 10:48 PM, Rob Dixon wrote: > On 31/01/2011 09:27, a b wrote: > >> >> Making it more clear. >> >> I want to make tar ball which contains my perl scripts and no other >>

Re: custom module and lib

2011-02-08 Thread a b
on the web if you would explain what you did. > > Octavian > -- > From: "a b" > > Thanks a lot all for your views!! i got my solution > > > > Regards, > > a b > > > > On Mon, Jan 31, 2011 at 10:48 PM, Rob Dixon wrote: > > >

perl dd

2011-03-28 Thread a b
Hi, I want to know if any module for "dd" in perl is available. Any pointers will a great help Thanks, a b

Re: perl dd

2011-03-28 Thread a b
Hey Rob, Yes, you are right Thanks to mention this out. I was referring to unix dd command. was wondering if we have any module already available. i didn't found on cpan Thx a b On Mon, Mar 28, 2011 at 2:05 PM, Rob Coops wrote: > > > On Mon, Mar 28, 2011 at 10:18 AM, a b

Re: perl dd

2011-03-28 Thread a b
Thanks Rob I too was thinking that way. Just in case if any one might have face this issue and hence this email Well if no module i will live with it for time being Regards, a b On Mon, Mar 28, 2011 at 2:46 PM, Rob Coops wrote: > I had a quick look but I can only see people making sys

Re: perl dd

2011-03-29 Thread a b
ike, the only option in this galaxy :( Thanks Everyone Regards, a b On Mon, Mar 28, 2011 at 6:10 PM, Chas. Owens wrote: > On Mon, Mar 28, 2011 at 05:22, a b wrote: > > Thanks Rob > > > > I too was thinking that way. Just in case if any one might have face this > > issue

Re: perl dd

2011-03-30 Thread a b
Thanks all!! Can someone tell me if you have any experience in generating files quickly(not sparse) in unix? I want to generate millions of files under some directory Thanks in Advance! On Tue, Mar 29, 2011 at 10:27 PM, Filip Sneppe wrote: > Hi, > > On Tue, Mar 29, 2011 at 4:57 PM, a

How to truncate few bytes of file

2011-05-20 Thread a b
Hi All, I need to truncate last few bytes of file. these files are big in size. One idea is to write needed bytes to another file and delete the original file, but i am dealing with big files :( dont want to use truncate, it just truncating the size, all data is gone any pointers Thanks a b

Re: How to truncate few bytes of file

2011-05-20 Thread a b
close(fd); print "\nTruncate successful\n"; On Fri, May 20, 2011 at 6:07 PM, Paul Johnson wrote: > On Fri, May 20, 2011 at 03:40:35PM +0530, a b wrote: > > > Hi All, > > > > I need to truncate last few bytes of file. these files are big in size. >

Re: How to truncate few bytes of file

2011-05-23 Thread a b
Hey Thanks uri!!! Actually i have a global variable which contains information of all files and their size you have given great directions Thanks all of you!! Regards a b On Fri, May 20, 2011 at 9:39 PM, Uri Guttman wrote: > >>>>> "ab" == a b writes: > >

Re: help: segmentation fault in threads program that use binmode

2011-07-12 Thread a b
Hi, did you got your issue resolved!! I also face segmentation fault but without binmode I didn't found any solution any where and opted another solution my program was using thread in loop till perl dump core with Out of memory issue Best of luck ~a b On Thu, Jun 9, 2011 at 5:32 AM, a

timings of perl subroutine with a program

2011-11-02 Thread a b
Hi all, i need to track down how much time each function is taking and anlyze if threads can help do we have any such function??

Re: timings of perl subroutine with a program

2011-11-04 Thread a b
apologize!! Can you help me to understand how async I/O can help me Regards a b On Thu, Nov 3, 2011 at 9:06 PM, Shlomi Fish wrote: > Hello a b, > > please reply to the list as I specifically request in my signature. > (Wretched > gmail.com.) I'm CCing the list. > > O

Re: timings of perl subroutine with a program

2011-11-07 Thread a b
Thanks a ton!! Hats off to you for encouragement On Fri, Nov 4, 2011 at 5:05 PM, Shlomi Fish wrote: > Hi "a b", > > On Fri, 4 Nov 2011 15:18:00 +0530 > a b wrote: > > > apologize!! > > > > Can you help me to understand how async I/O can help me >

Perl to python converter

2011-12-23 Thread a b
Any thoughts?

Net::Telnet --help required

2007-05-16 Thread a b
Hello, I am trying to telnet to all m/c for which i haven't set password(only root is a valid user) any body can telnet using root user But when i try to access through perl it use warnings; use Net::Telnet; my $t = new Net::Telnet (Timeout => 10,Prompt => '/bash\$ $/'); my @line; $t->open("host

Re: Net::Telnet --help required

2007-05-17 Thread a b
/usr/bin/ls"); print @forecast; C:\>perl j.pl HP-UX slias10 B.11.31 U ia64 (ta) command timed-out at j.pl line 7 login: Please, suggest i am able to see the On 5/16/07, Jay Savage <[EMAIL PROTECTED]> wrote: On 5/16/07, a b <[EMAIL PROTECTED]> wrote: > Hello, > I am tr

help with reading file script | Help !!

2007-10-19 Thread Juan B
Hi all !! im really new to perl so please bare with me and help.. I need a script to read /var/log messages and each time it sees a line with the word "IDS" it will send the whole line via mail to the administrator of the IDS, here is an example of such a line: Oct 19 15:40:30 172.31.0.254 %PIX-4

problem runing code | strange Error

2007-10-23 Thread Juan B
-Hi, Im trying to run this code: (im getting this error message): Can't use string ("From") as a HASH ref while "strict refs" in use at /usr/lib/perl5/site_perl/5.8.8/Mail/Mailer.pm line 320. The code: use strict; use warnings; use Mail::Mailer; my @lines = (); open (INFO, "/var/log/messages"

Re: problem runing code | strange Error

2007-10-23 Thread Juan B
Hi, I did it and know I get another error: syntax error at logcheck line 25, near "'PiX Detected Attack } ' )" Missing right curly or square bracket at logcheck line 28, at end of line Execution of logcheck aborted due to compilation errors. This is the code: use strict; use warnings; use Mail:

Re: problem runing code | strange Error

2007-10-23 Thread Juan B
Ok I did it and know I get another error :-( here goes the error: Died at /usr/lib/perl5/site_perl/5.8.8/Mail/Mailer.pm line 284. this is the code: use strict; use warnings; use Mail::Mailer; my @lines = (); open (INFO, "/var/log/messages") or die "$!"; while (my $line = ) { if ($line =~ /I

Perl file and STDERR

2013-07-09 Thread jitendra B
Hi All, Can you please let me know the following snippset? why it is used for? select( STDERR ); $| = 1; select( STDOUT ); $| = 1; print STDERR "\nThis is india\n\n"; print STDERR "Usage: This is build"; print STDERR "where: base PL label\n"; and second question second ques

Re: Perl file and STDERR

2013-07-09 Thread jitendra B
Thank you very much Andy, Nathan, Shawn for your kind help. I am new to the perl. Why auto-flush is needed here (STDERR autoflushes)? It will free the memory or something else. Regards, Jitendra On Tue, Jul 9, 2013 at 9:10 PM, Andy Bach wrote: > > On Tue, Jul 9, 2013 at 9:37 AM, Nathan Hilt

Getting error- connect to Bugzilla(Certificate Authorities to trust)

2015-09-09 Thread Jitendra B
'; $opt_u or die("Missing username"); $opt_p or die("Missing password"); $opt_s or die("Missing site"); my $b = WWW::Bugzilla3->new( site => $opt_s ); my $r = $b->login( $opt_u, $opt_p ) or die("Could not login"); ### $r my @pids =

Re: Getting error- connect to Bugzilla(Certificate Authorities to trust)

2015-09-09 Thread Jitendra B
end. > > On Thu, Sep 10, 2015 at 1:54 AM, Jitendra B wrote: > >> Dear Sir/Madam, >> >> while I try to connect and query some data from bugzilla, I am getting >> following error. >> >> Error: >> >> RPC::XML::Client::send_request: HTTP s

Re: Getting error- connect to Bugzilla(Certificate Authorities to trust)

2015-09-10 Thread Jitendra B
t_u or die("Missing username"); #$opt_p or die("Missing password"); #$opt_s or die("Missing site"); my $b = WWW::Bugzilla3->new( site => 'https://bugzilla.mysite.com' ); my $r = $b->login( "jbarik","xxx" ) or die(&q

helping writing a script

2005-10-16 Thread Juan B
Hi guys ! I have four html pages. within eack one I have a firewalls logs.I need to write a script that will search all the ip address after the work "from: and wrote tham in a file and if the ip is written already in the report file so dont write in again. please help me on this or give me some

how to send mail within a script ?

2005-10-22 Thread Juan B
HI, I am trying to write a script which will send the result of a var to mail web mail.this is what I wrote : #!/usr/bin/perl #use strict; use warnings; my $file_listing = `/usr/bin/nmap -p 80 192.168.1.1`; How can it be done? do I need to configure sendmail on my linux box. please try to give a

  1   2   3   4   >