Hi I have about 300 + ip regex in my apache file like this
11\.45\.3[2-9]\..*$
^11\.45\.4[0-9]\..*$
^11\.45\.5[0-9]\..*$
I have to convert like this into CIDR .
· 11.45.32.0/21
· 11.45.40.0/21
· 11.45.48.0/23
· 11.45.50.0/21
11.45.58.0/23
is there a mo
Hi
I just came across this special var $| , autoflush , jsut wondering how and
where to use this . Can some one help me understand the concrete use of
this special var.
Thanks
--
Regards
Agnello D'souza
“Happiness is not so much in having , but in sharing.
We make a living by what we get,
but
could i use local $/ instead of $INPUT_RECORD_SEPARATOR
On Fri, Jul 12, 2013 at 5:33 PM, Shawn H Corey wrote:
> On Fri, 12 Jul 2013 17:14:42 +0530
> Agnello George wrote:
>
> > i have raw data that is like this in a flat file .
> >
> > start
> > name:agnell
hi
i have raw data that is like this in a flat file .
start
name:agnello
dob:2 april
address:123 street
end
start
name:babit
dob:13 april
address:3 street
end
start
name:ganesh
dob:1 april
address:23 street
end
i need to get the data in the following format
name:agnello, dob:23 april ,address:
On Thu, Dec 15, 2011 at 9:24 PM, Mark Tiesman
wrote:
> Hi all. I recently started a job that at some point is going to require me
> knowing and using Perl. I am pretty green as a programmer and need some
> guidance to get me going on the right foot. Currently I am reading the
> Llama book to gr
>> Compilation failed in require at download_db_4_syncscript.pl line 7.
>> BEGIN failed--compilation aborted at download_db_4_syncscript.pl line 7.
>>
>> any idea what went wrong .. thanks for all the help ..
>>
>
> See:
>
> http://www.cybersprocket.com/2011/programming-languages/weaken-is-only-ava
Hi
Today morning my script went bad , i have not reason why , one
possibility i had installed webmin on the same , but t dont think
that is the issue
weaken is only available with the XS version of Scalar::Util at
/usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/Packet.pm line 22
BEGIN failed--comp
On Thu, Nov 24, 2011 at 12:09 PM, Charith LokuBogahawatta
wrote:
> Hi All,
>
> I create following bash script to run some command on remote server
> and get information but I try to do same using Perl but I couldn't
> make it so any one can suggest way to get done this using perl ?
>
> my .sh.
Hi
I am trying to run a shell script within a perl cgi script , however it is
not getting executed .
cat /vae/www/cg-bin/syscscript.pl
:
:
my $openvpn = `ps aux |grep openvpn |grep -v grep`;
unless ( $openvpn) {
system(" /usr/sbin/openvpn /etc/openvpn/DC.ovpn ");
}
-
cat
When i run this f
in the Net::SMTP module how does one differentiate the header-from and
envelope-from ID .. i had read somewhere that $smtp->mail($from) is
the envelope form id .. then how do i add the header from ID .. .
thanks a million
:
$smtp->mail($from);
$smtp->to($to);
$smtp->data();
$smtp->datasend("Subjec
Hi
I have the following cgi script that that takes input of the a
remote database to dumped to a local server .$db1 is the input
which is a database-name . The issue is that some of the data base is
taking to long to get dumped from the remote server on to my local
server and and i get a con
hi
i have a few web portals as my job profile to take care of and i
have a request from my testing team for a s/w where i can 1) check
all links within the website and the time taken for each link to load
, 2) and if 500 to 1000 concurrent connections are spawned the average
time for each link
>
> Suggestions would be to install perlbrew and use it to install a more recent
> perl or just plain to force install, since everything else seems to be in
> working order.
>
i did a force install and gave me the following output
Test Summary Report
---
t/local/click_button.t (W
Hi
I get the following error when i install WWW::Mechanize via CPAN .
Can some one suggest me how to fix this . thanks
===
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/00-load.t t/add_he
On Tue, Jun 7, 2011 at 1:42 PM, Rob Coops wrote:
>
>
> On Tue, Jun 7, 2011 at 8:47 AM, Agnello George
> wrote:
>
>> HI
>>
>> I got the following hashref
>>
>> my $selet_domU_data = $DBH->selectall_hashref("select
>> ram,ip,a
On Tue, Jun 7, 2011 at 1:13 PM, marcos rebelo wrote:
> I don't understand what you are trying to do
>
>
>
Ok , i got 2 hashes
$hashref1 = [ { 'windows2 ' => { 'lvm' => ' windows2 8GB ram 50 GB HDD',
'cpu' => 'na', 'ip' => ' 171.16.1.10', 'application' => ' win2k8 ,sql,iis',
'hosting' => '', 'a
HI
I got the following hashref
my $selet_domU_data = $DBH->selectall_hashref("select
ram,ip,application,hosting,assigned_to,rdom0id from domU_info where
server_name='$domU_server' ",'server_name' );
my $select_all_website = $DBH->selectall_hashref("select
website_id,website_name from websites
hi
i have the following hash as out put from a sql query
VAR1 = [ { '16' => { 'srch_type_id' => '162', 'rid' => '2' }, '13' => {
'srch_type_id' => '123', 'rid' => '1' }, '17' => { 'srch_type_id' => '147',
'rid' => '2' }, '15' => { 'srch_type_id' => '135', 'rid' => '1' }, '14' => {
'srch_type_id
>push @files, @dirfiles;
>}
>
>return {
>src_uri => $src_uri,
>dest_uri => $dest_uri,
>files => \@files
>};
> }
>
> sub prompt_to_continue
> {
>my ($instructions) = @_;
>print Dumper $instructions;
>print "Continue? (yes/no) ";
>exit(1)
> ls
>>
>> index.php 123.php dual.templ dual_2.templ go.php data.txt
>>
>> i need to create a tar of this in the same given format
>>
>> index.php
>> dualfilder/dual.templ dual_2.templ
>> go/go.php
>> go/numbers/123.php
>> data/data.php
>>
>>
>> i cant seem to come up with a a logic on how to g
HI
i am given ever day a list of files which i wget within a parent folder .
my team gives mea structure where theses files are located
cat /home/upload_files1.txt
download the files form wget http://localserver/website1 and upload on
http://prodserver/weebsite1
index.
>
> This interpolation of string variables into an SQL statement is an SQL
> injection attack waiting to happen:
>
> * http://en.wikipedia.org/wiki/SQL_injection
>
> * http://community.livejournal.com/shlomif_tech/35301.html
>
> * http://bobby-tables.com/
>
> Please avoid it by using placeholders.
On Sat, May 28, 2011 at 2:24 PM, Agnello George wrote:
>
>
> On Fri, May 27, 2011 at 6:21 PM, Agnello George
> wrote:
>
>>
>>
>> On Fri, May 27, 2011 at 6:05 PM, Shlomi Fish wrote:
>>
>>> On Friday 27 May 2011 13:48:21 Agnello George wrote:
>&
On Fri, May 27, 2011 at 6:21 PM, Agnello George wrote:
>
>
> On Fri, May 27, 2011 at 6:05 PM, Shlomi Fish wrote:
>
>> On Friday 27 May 2011 13:48:21 Agnello George wrote:
>> > Hi
>> >
>> > I am using TT to display my data from my db ,
>> >
&g
On Fri, May 27, 2011 at 6:05 PM, Shlomi Fish wrote:
> On Friday 27 May 2011 13:48:21 Agnello George wrote:
> > Hi
> >
> > I am using TT to display my data from my db ,
> >
> >
> > i insert the following data from a Front end using ()
> into
> &
Hi
I am using TT to display my data from my db ,
i insert the following data from a Front end using () into
my database the data is like this in mysql :
--+--+---+-+-
On Sat, May 14, 2011 at 1:37 PM, Brandon McCaig wrote:
> On Sat, May 14, 2011 at 3:57 AM, Agnello George
> wrote:
>> I got a string like this
>>
>> $string = ' [a b c d]'
>>
>> i need to get a b c d in to a array called @all.
>>
>> i w
hi
I got a string like this
$string = ' [a b c d]'
i need to get a b c d in to a array called @all.
i was was trying to so a split with delimiter '\s+' but still i get
[a
b
c
d]
but i want
a
b
c
d
any idea how to get this done , thanks
--
Regards
Agnello D'souza
--
To unsubscribe, e
On Fri, May 13, 2011 at 4:30 PM, Rob Coops wrote:
> It might not look nice but I would do the following:
> #!/usr/local/bin/perl
> use strict;
> use warnings;
> my $arrayref = [ [ [ 'user1', 'c'], [ 'user2', 'a'], [ 'user2', 'b' ],[
> 'user2', 'd' ],[ 'user3', 'a' ],[ 'user2', 'f' ] ] ];
> my %has
Hi All
I have a small issue in arranging data with a array ref .
$arrayref = [ [ [ 'user1, 'c'], [ 'user2', 'a'], [ 'user2', 'b' ],[
'user2', 'd' ],[ 'user3', 'a' ],[ 'user2', 'f' ] ] ];
i tried the following
my %sh ;
foreach my $i ( @$arrayref) {
push (@{$sh{$i->[0]}},{group => [$i->[1] } )
Hi
I got a form with and users and insert in textarea words like :
/word_word2/wordword_word.txt
/word1_word/wordword_word2.txt
/word_word/word2word_word.txt
but they should not be able to type the following in the text area
/
%
$
###
space
unless ( $files =~ /^\s+$/ || /[\_\/\@\$\#]/)
>
> This may be because $evalue !=3 and therefore the if block does not execute.
> You need to send the header in all cases. Try changing your if block to:
>
> if ( $evalue == 3 ) {
> my $cookie = $cgi->cookie(CGISESSID => $session->id);
> print $cgi->header( -cookie=>$cookie );
> deploy
On Wed, May 4, 2011 at 7:01 PM, Pete Smith wrote:
> Remove this line:
>
> print "Content-type: text/html\n\n";
if i remvove this line for my script login.pl the web server log gives me
[Wed May 04 19:14:30 2011] [error] [client 192.168.2.94] malformed
header from script. Bad header=>
>> my $c
Hi
In my script i am using template toolkit. I am trying to set the
cookie in my browser but all that it does is it prints the following
output on my broswer :
Set-Cookie: CGISESSID=f032fc8982a1ae022c4f51baa3bc4143; path=/ Date:
Wed, 04 May 2011 13:07:40 GMT Content-Type: text/html;
charset=ISO-
HI
I have as hash within my script.pl file which look like this
my %verticals = ( 'auto_v1' => {
'tempdir' => '/var/www/html/temp/auto' ,
'svnurl' => 'http://svn.int.com/repos/a.com/branch/auto',
'excludes' =>
'uploaded_images|includes/config.php|admin/includes/config.php|.svn',
'
On Fri, Apr 29, 2011 at 2:44 PM, Agnello George
wrote:
> On Fri, Apr 29, 2011 at 2:33 PM, Rob Dixon wrote:
>> On 29/04/2011 09:47, Agnello George wrote:
>>>
>>> my %retrn = ( 0 => { 0 => ' successful'},
>>> 1 => { 1 => &
On Fri, Apr 29, 2011 at 2:33 PM, Rob Dixon wrote:
> On 29/04/2011 09:47, Agnello George wrote:
>>
>> my %retrn = ( 0 => { 0 => ' successful'},
>> 1 => { 1 => 'insufficient'},
>> 2 => { 2 => 'txtfile m
Hi All
I got a hash like this :
my %retrn = ( 0 => { 0 => ' successful'},
1 => { 1 => 'insufficient'},
2 => { 2 => 'txtfile missing'},
3 => { 3 => 'bad dir '},
);
( i know this hash looks funny , but is the hash i got to use )
suppose $stdout = 0;
i need to
On Fri, Apr 29, 2011 at 1:09 PM, Uri Guttman wrote:
>>>>>> "AG" == Agnello George writes:
>
> AG> is there a better way of writing this script
>
> this is not a script but a short code snippet. there are many ways to
> redo this. many questions
Hi All
is there a better way of writing this script
my @resultss = qw( 0 1 2 3 4 5 ) ;
foreach ( @resultss) {
if ( defined( $jvalue{$_}){
$status .= $jvalue{$_} ;
}
}
Thanks
--
Regards
Agnello D'souza
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands,
On Tue, Apr 26, 2011 at 9:04 PM, Jim Gibson wrote:
> At 6:04 PM +0530 4/26/11, Agnello George wrote:
>>
>> I got a to go to check whether the files in @somefiles exist in
>> $filltar
>
> $filltar or $fultar?
>
>> my $fultar = 'something.tgz"
I got a to go to check whether the files in @somefiles exist in $filltar
my $fultar = 'something.tgz"
@somefiles = qw(xsl/photos_videos.xsl
xsl/research.xsl
xsl/reviews.xsl
xsl/sendemail.xsl
xsl/slideshow.xsl
xsl/slideshow_details.xsl );
$tar->add_files(@allfiles_excluded);
$tar->write
On Fri, Apr 22, 2011 at 10:41 PM, wrote:
> I realize that this list may not be the best, or even most
> appropriate, place to ask this question, but I'm just so curious that I'm
> losing sleep over it! =;)
>
> What is the best way to embed perl in an HTML file that is _not_
> loc
Hi All
i am creating a script for deployment of websites and i need to create
hash%config ( which stores a lot of configurations setting for
each type of website ) ... i have been manually eaditing this hash
but now the hash has to now be generated from a a database ( mysql )
... i have
On Wed, Apr 20, 2011 at 4:34 PM, Shlomi Fish wrote:
> Hi Agnello,
>
> On Wednesday 20 Apr 2011 13:59:24 Agnello George wrote:
>> On Wed, Apr 20, 2011 at 4:14 PM, Shlomi Fish wrote:
>> > On Wednesday 20 Apr 2011 12:50:45 Agnello George wrote:
>> >
>> &
On Wed, Apr 20, 2011 at 4:14 PM, Shlomi Fish wrote:
> On Wednesday 20 Apr 2011 12:50:45 Agnello George wrote:
>> Hi
>>
>> I have script where i need to go in to a directory and put all files
>> in to a array
>>
>> if ( chdir ("$dirtemp")
On Wed, Apr 20, 2011 at 4:14 PM, Shlomi Fish wrote:
> On Wednesday 20 Apr 2011 12:50:45 Agnello George wrote:
>> Hi
>>
>> I have script where i need to go in to a directory and put all files
>> in to a array
>>
>> if ( chdir ("$dirtemp")
Hi
I have script where i need to go in to a directory and put all files
in to a array
if ( chdir ("$dirtemp") ) {
find (sub { push @all , $File::Find::name}, ".");
my %selectfiles = qw( /classes/mail.class.php
classes/dealer.class.php
classes/memcache.class.php
classes/phpmailer
classes/phpma
hi
File::path the option keep_root => 1 does not seem to work for me
use File::Path;
rmtree( '/temp/auto', { verbose =>1 , keep_root => 1});
it throw me the output
unlink /temp/auto/test6 unlink /temp/auto/test5 unlink /temp/auto/test4
rmdir /temp/auto
the option keep_root => 1 should
>> my @all_svn;
>> #my $WW = ' http://192.168.1.25/template/ajax-loader.gif"; />'; ### cant sem to
>> make this work!!
>
> What are you trying to do here.
i am trying to display a loader image, until the page finishes
loading, i think this is bet done with Javascript ..will stick to that
.
HI
Would just like to know if there is any perl module where i could call a
svn export function.
--
Regards
Agnello D'souza
On Mon, Apr 18, 2011 at 6:17 PM, Shlomi Fish wrote:
> Hi Agnello,
>
> some comments on your code.
>
> On Monday 18 Apr 2011 15:18:22 Agnello George wrote:
> > Hi
> >
> > I am trying my hand in CGI , i have script that runs svn list on-submit
> > which obv
On Mon, Apr 18, 2011 at 6:17 PM, Shlomi Fish wrote:
> Hi Agnello,
>
> some comments on your code.
>
> On Monday 18 Apr 2011 15:18:22 Agnello George wrote:
> > Hi
> >
> > I am trying my hand in CGI , i have script that runs svn list on-submit
> > which obv
Hi
I am trying my hand in CGI , i have script that runs svn list on-submit
which obviously takes 30 to 40 secs for the page to load , i plan to use a
ajax loader to be printed untill those 30 to 40 seconds. But even after the
page has finished loading i can still see the image. I am not good in
On Sat, Apr 16, 2011 at 2:36 PM, Uri Guttman wrote:
>
> AG> open(INPUT_FILE, $filename) or die "cannot opnen file $!";
>
> don't use bareword filehandles. this is said all the time here. use
> lexical handles.
>
Could you Give me a example for lexical handles or reference me to a website .
Th
On Sat, Apr 16, 2011 at 11:36 AM, Gurunath Katagi
wrote:
> hi .. i am new to perl ..
> i have a input file something pasted as below ..
>
> 16 50
> 16 30
> 16 23
> 17 88
> 17 99
> 18 89
> 18 1
> ..
> --
>
> and i want the output something like this :
> 16 50 30 23
> 17 88 99
> 18 99 1
>
> i.e for
>>
>>
>> i even tried the following :
>>
>>
>> sub some_sub {
>> $DBH_local = DBI->connect("DBI:mysql::192.168.1.26", "all_user",
>> "all_passwd") || return 0 ;
>>
>> } ;
>>
>> }
>>
>>
>> but this too doesn't work . gives me the same error "Internal server error "
>>
>> Please help me with this
Hi All
In my code i am trying to connect to a db if it fails it should return
0 , this a web based script and it throws me internal server error
and the apache logs gives me Premature end of script headers:
syncscript.pl , But if i am able to connect to the remote host then
my code works fine
Hi
i am able to run a command on the remote machine but i am not able to
completely login to the remote machine
=
use Net::SSH::Expect;
my $ssh = Net::SSH::Expect->new (
host => "1.1.1.1" ,
password=> "password",
user => "user1",
raw_pty => 1
i got a file like this and i need add it into my svn
admin/upload_data/FINAL leg list 19_01_2010 to agar (Merged data in
one).xls
i as able to add other files with space using the following command :
svn st |grep ? |cut -c8- |sed 's/ /\\ /g' |xargs svn add
however there are some special c
Hi
I have written a small script to input customer data in to a flat file, i
would like some guidance on how i could write this script better , i would
also like to know if i have optimally used HoH properly .
On Thu, Nov 4, 2010 at 2:40 PM, Rob Coops wrote:
>
>
> On Thu, Nov 4, 2010 at 9:50 AM, Agnello George
> wrote:
>
>> HI
>>
>> i wrote a small simple script using Net::smtp however my local MTA is not
>>
HI
i wrote a small simple script using Net::smtp however my local MTA is not
accepting the mail here is the script :
=
#!/usr/bin/perl
use strict;
use warnings;
use Net::SMTP;
use Getopt::Long;
my $from = '' || 'sys...@server1.com' ;
my $sub =
HI
i wrote a small simple script using Net::smtp however my local MTA is not
accepting the mail here is the script :
=
#!/usr/bin/perl
use strict;
use warnings;
use Net::SMTP;
use Getopt::Long;
my $from = '' || 'sys...@server1.com' ;
my $sub =
On Sat, Oct 16, 2010 at 2:11 PM, Shlomi Fish wrote:
> On Thursday 14 October 2010 16:54:32 yo RO wrote:
> > Hello I need to split a log file per days
> > I have a file in txt format and I want to create a file with all data
> > from one day in one file
> > I will give example
> >
> > I have this
I know the problem is solved but Could the script be done like this ??
#!/usr/bin/perl
use strict;
use warnings;
while (my $line = ) {
chomp($line);
my ($out_file) = $line =~ m/^(\d+_\d+_\d+);/;
open (WRT,">>$out_file.log" ) or die " cannot opne file:
$!";
HI
Is there any site or any book other than "learning perl" where i would get
real life exercises on perl scripting.
Thanks
--
Regards
Agnello D'souza
( i did'nt know where to post this; perl forum or python forum )
I am a bit confused, i have been learning perl last 1.5 yrs .. then
suddenly in my new company they use python to do all their scripting work ,
so i would have to follow protocol :) and learn python
So now just wanted to know
On Wed, Aug 25, 2010 at 12:58 AM, Brian Fraser wrote:
> On Tue, Aug 24, 2010 at 11:08 AM, Peter Scott wrote:
>
>
> > CPAN: Net::SSH::Perl .
>
> I had a similar issue not too long ago; Spent a couple of days attempting
> to
> get Net::SSH::Perl to compile properly, gave up, went to CPAN, found
>
Hi
we have multiple servers which have high volume of data that flow in and
out of our server and we are able to monitor these individually using the
MTRG open source graph . But i need ( or if i need ) to write a cgi script
on a server that collects the mrtg data from the rest of the server an
Hi
I am planning to use the Net::POP3 module to downald a mail box and then
pass the mails via a parser . I would like to know if the there is a option
to downlod only a certin number ( 100 ) of mails [unread] and then mark
the mails as read . The mail box sie is 400 mb . And is there a way to
On Tue, Dec 8, 2009 at 12:29 PM, mahesh bhasme wrote:
> Hi,
> I have to configure yum installation using perl. I want write script for
>
> [r...@bis-testqa ~]# yum install perl
>
> Setting up Install Process
>
> Parsing package install arguments
>
> Package perl - 4:5.8.8-10.el5_0.2.x86_64 is alr
Hi
i am basically a a system administrator, and i have just joined this new
company where my entire team are a group pf developers + system admins and i
am the only system admin with out programming knowledge . i know a little of
shell scripting from my previous company and i thought shell script
73 matches
Mail list logo