User Profile

Collapse

Profile Sidebar

Collapse
babp
babp
Last Activity: Aug 23 '13, 07:07 PM
Joined: Sep 22 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • restrict the population of elements in a data structure.

    Hi All,
    Please help me to restrict the population of this hash structure.I don't want to exit from the program if var not defined on this example.

    Code:
    #!/usr/bin/perl
    my %a;
    if (defined $a{'abd'}->[0] ){
    print "yes \n";
    
    }
    use Data::Dumper;
    print Dumper \%a;
    RESULT
    ======
    
    $VAR1 = {
              'abd' => []
            };

    ...
    See more | Go to post
    Last edited by Meetee; Dec 14 '11, 11:40 AM. Reason: code tags added

  • Net::SSH::Expect error .SSHAuthenticationError Login timed out

    Hi ,
    Please help me for this authentication erroror:

    I am trying to ssh to a client(est21.in d.bg.com)
    using Net::SSH::Expec t .
    As per the login is successful but getting following error .I tried with diffrent timeout value also.

    SSHAuthenticati onError Login timed out. The input stream currently has the contents bellow: Last successful login: Mon Oct 24 13:46:07 IST 2011 est.ind.bg.com ...
    See more | Go to post

  • babp
    replied to How to get input xml file as XMLout. output.
    in Perl
    I need a solution for below scenario .Is it possible to do the below one without using any Module.




    Hi Iam new to perl and need a help to send inputs to an running application :



    I am running an application XXXX , and when it starts i am passing a file name called "connect.sp b" and after the application connects to the server i am sending filename "accept.spb " as a parameter....
    See more | Go to post

    Leave a comment:


  • babp
    replied to How to get input xml file as XMLout. output.
    in Perl
    Thanks for the solution
    See more | Go to post

    Leave a comment:


  • babp
    started a topic How to get input xml file as XMLout. output.
    in Perl

    How to get input xml file as XMLout. output.

    Hi ,
    I am trying to get an reference of a XML formatted data using XML::Simple::XM Lin

    and again trying to retrive the XML data as it was before using XML::Simple::XM Lout.

    But finding a deviation in the format can any pls help me out.


    Input file sr.xml
    ===========
    Code:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <scenario>
    <counter>
    ...
    See more | Go to post
    Last edited by numberwhun; Jun 5 '10, 11:27 PM. Reason: Please use CODE TAGS!!!!

  • Hi jeff ,
    Thanks for the reply i got the solution :

    ACE25C1: ...Monday/package 154 $ cat diff.pl
    my $a=system("sh diff.sh");
    print $a;


    ACE25C1: ...Monday/package 155 $ cat diff.sh
    diff aaa bbb
    if [ `diff aaa bbb | grep -c "^1c1$"` -eq 0 ]
    then
    exit 0
    else
    exit 1
    fi
    See more | Go to post

    Leave a comment:


  • Hi Jeff ,
    Thanks for the response since i jhave explained already I need exit status as 1 or 0.

    If i'll use backtick it'll return the diff output like below:
    1c1
    < 1hi hello
    ---
    > hi hello

    But I need script to return a value like 1 if it finds any diffrence between two files and 0 if it doesnot find any diffrence between two files .
    See more | Go to post

    Leave a comment:


  • How to return a value of a variable from shell script to perl script

    HI ,
    Is there any way to return a value of variable from shell to perl script.

    Code:
    ===
    Code:
    Perl file 
    my $diff1=system("sh diff.sh");
    my $diff2=system("sh diff1.sh");
    I need exit status of below commands

    i.e 0 and 1 respectively.

    Since in both the cases diff is working so system command will return 0 .
    Code:
    diff1.sh
    -------
    ...
    See more | Go to post

  • babp
    replied to Sending an input to a running application.
    in Perl
    Thanks Jeff for this useful information , I'll try with Expect module.
    See more | Go to post

    Leave a comment:


  • babp
    started a topic Sending an input to a running application.
    in Perl

    Sending an input to a running application.

    Hi Iam new to perl and need a help to send inputs to an running application :



    I am running an application XXXX , and when it starts i am passing a file name called "connect.sp b" and after the application connects to the server i am sending filename "accept.spb " as a parameter.

    BL31DL385:$ ./XXXX

    This is XXXX (Reproducer by Order or RelaY)


    XXXX>...
    See more | Go to post
No activity results to display
Show More
Working...