Results 1 to 7 of 7
  1. #1

    Default PERL Scripting Support Thread


    Im currently working with PERL scripts for our hardware evaluation and it just crossed my mind to create a thread about PERL script support.

    Anybody out there who have expertise and are familiar on this can post their solutions to problems and issues raised here.

    Right now, Im using ActivePerl 5.8.8.822. My editors are Komodo Edit 4.2.0 and Code Wright 7.5.

  2. #2

    Default Re: PERL Scripting Support Thread

    To start with, does anybody here have an idea on automation of Excel thru PERL script. Below is the chart plotting lines from the script I'm using for my hardware evaluation.

    my $Range = $Sheet->Range($B);
    my $Chart = $Excel->Charts->Add;
    $Chart->{ChartType} = xlXYScatter;
    $Chart->SetSourceData({Source => $Range, PlotBy => xlColumns});
    $Chart->{HasTitle} = 1;
    $Chart->ChartTitle->{Text} = "FO vs MSE";

    What I want is that I can create legends automatically. Anybody?

  3. #3

    Default Re: PERL Scripting Support Thread

    Here is some concern that I have today. Its about subroutines.

    # main program
    $val = 1;
    ...
    ...
    sbr1($val);
    sbr2($val);
    #end of main program

    sub sbr1{
    $a = @_; # $a receives the value of $val. This is a scalar.
    printf"$a\n";
    }


    sub sbr2{
    @m = @_; # $a receives the value of $val. This is an array.
    $a = $m[0];
    printf"$a\n";
    }


    If I run the script, I get different values of $a. Any idea why?

  4. #4

    Default Re: PERL Scripting Support Thread

    On sbr2, you are passing parameter $val which is not an array.
    If the function asks for an array var, array should be passed.
    Sbr1 is ok because $val is scalar (=1).

  5. #5

    Default Re: PERL Scripting Support Thread

    thanks for the reply.

    But in Perl, either you have this subroutine,

    sbr1($a);

    or this one

    sbr1($a,$b,@c);

    All of those passed variables are dumped into one variable and that is @_ and can the be broken down into $_[0], $_[1]...,$_[n];

    now if im going to do this

    $x = @_;

    I am suppose to expect that the content of my $x would be the content of $_[0], right?

    Any comment?

  6. #6

    Default Re: PERL Scripting Support Thread

    >sbr1($a,$b,@c);
    >All of those passed variables are dumped into one variable and that is @_ and can the be broken down into $_[0], $_[1]...,$_[n];
    Correct.

    But your

    >$x = @_;

    is illegal because, the parameter @_ is an array.
    If you want to pass a single scalar parameter and assign it to $a use:

    $a = $_[0]

  7. #7

    Default Re: PERL Scripting Support Thread

    Exist Global Inc. is urgently looking for Perl Developers.

    Please see this link if interested: https://www.istorya.net/forums/jobs/5...er-urgent.html

  8.    Advertisement

Similar Threads

 
  1. The ♥ Marian Rivera Fans and Supporters Only Thread
    By unsay_ngalan_nimo in forum TV's & Movies
    Replies: 231
    Last Post: 08-12-2015, 09:11 AM
  2. For Sale: KOREAN DRESSES & BLOUSES @ p350 - p490 only! Must see thread!! I need your support jd
    By cute factory in forum Clothing & Accessories
    Replies: 24
    Last Post: 01-15-2011, 04:36 PM
  3. Official Thread For Gordon Supporters and Volunteers
    By MtClimber in forum Politics & Current Events
    Replies: 1
    Last Post: 04-26-2010, 11:57 AM
  4. the VS. thread
    By DrE in forum Arts & Literature
    Replies: 268
    Last Post: 10-23-2008, 08:09 PM
  5. DANSGuardian .... support thread...
    By avatar_of_woe in forum Networking & Internet
    Replies: 0
    Last Post: 03-30-2006, 01:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top