Search Results

Search: Posts Made By: Raynon
3,164
Posted By Raynon
Convert from Csh to Perl
Hi ,

I am trying to convert the below code embedded in a csh script to Perl.
Can any expert give me some advice on this ?



sed -n ''"$start_line"',$ p' $tester_dir/nfiles_extracted.txt|cut...
11,899
Posted By Raynon
Hi jp2542a & dinjo_jo, Thanks for the...
Hi jp2542a & dinjo_jo,

Thanks for the guidance.
I am trying to put this code from csh to Perl.
Can you help me convert as i am still a novice in Perl ?
11,899
Posted By Raynon
Check if Process is running
Hi ,

I have a csh code below which check the process if it's running.
Can any expert advise me on the following:
1) what does this notationmean ">!" and how is it different from the append ">"...
1,748
Posted By Raynon
Hi prasperl, May i know if the below code is...
Hi prasperl,

May i know if the below code is added , will it set all the rest of the base array index to 1 or does it just apply to the particular array @Marks only ?


$[ = 1;

...
1,748
Posted By Raynon
Perl Array Variables to be returned to main
Hi All,

I can;t seem to print out the array in sequence using the below subroutine.
My first element in the array @lotsuffix is suppose to be $lotsuffix[1] as defined in the subroutine, but when...
14,361
Posted By Raynon
Hi , Through Try and Error , i finally found...
Hi ,

Through Try and Error , i finally found out the way to do it.
Can any expert explain why with " while ($line=<F>) ", it is able to work ?
But with " while (<F>) " , it is not able to work...
14,361
Posted By Raynon
Hi, I just a simpler code to simulate the...
Hi,

I just a simpler code to simulate the unix command, but how am i suppose to assign the string being printed out to a variable ?
Tried to use the below but it can't work.
Can any expert help...
14,361
Posted By Raynon
Hi, I got this syntax msg when i do a syntax...
Hi,

I got this syntax msg when i do a syntax check.
Can anybody advise me on this error message ?


$ !!
perl -c testing
Name "main::ST_file" used only once: possible typo at testing line...
14,361
Posted By Raynon
Hi KevinADC, What i am trying to do here is...
Hi KevinADC,

What i am trying to do here is to simply perform the following unix command.
To list those files which matches the terms *$tester*st* and grab the latest file and assign it to a...
14,361
Posted By Raynon
Hi, I have the below code. But it doesn;t...
Hi,

I have the below code.
But it doesn;t seem to work.
Can you help ?



use File::stat;
my @file_match = (<*$tester*st*>);
for ( $count = 1 ; $count <= $#file_match ; $count++ ) {
...
14,361
Posted By Raynon
Hi Ghostdog, I have a code below. But i do...
Hi Ghostdog,

I have a code below.
But i do not know whether this simulates "ls -rt *$testid*st*| tail -1"
Can you give some guidance ?



while (<*$testid*st*>) {
my $ST_file =...
14,361
Posted By Raynon
Piping and assigning output to a variable in Perl
Hi All,

I am trying to convert the below Csh code into Perl.
But i have the following error.
Can any expert help ?

Error:
ls: *tac: No such file or directory


Csh

set $ST_file = `ls...
6,827
Posted By Raynon
Hi pludi, Ahhh, now i am starting to...
Hi pludi,

Ahhh, now i am starting to understand what your codes are getting at.
Thks alot for your advice! :b: :)
6,827
Posted By Raynon
Hi pludi, I am trying to spilt out all the...
Hi pludi,

I am trying to spilt out all the strings in the file name reports_${counting}_${_[0]}.txt, so that i can extract out the 2nd field if the 1st field match.


my @Fld = split(' ',...
6,827
Posted By Raynon
Opening Mulitple files using For loop in Perl
Hi All,

I have a total of ten file to open in the Perl script and i am using a for loop to open each file and capture some strings inside each file.
Unfortunately, i encounter the below syntax...
3,283
Posted By Raynon
Hi pludi, Thks for your advice. But what...
Hi pludi,

Thks for your advice.
But what does $1 represent in Perl.
I only understand that $1 represent 1st field in AWK, is that the same for Perl ?
3,283
Posted By Raynon
Check for Numeric output in Perl
Hi All,

I would like to convert my below csh script to Perl.
Can any expert help ?



# To check for numeric input
set tested1 = `echo "$tested"| awk '/^[0-9]+$/'`;

# To remove...
3,296
Posted By Raynon
Hi Pludi, Thks for the advice. But if my...
Hi Pludi,

Thks for the advice.
But if my csh statement is the below. How can i convert the below to Perl ?


set SB$count = `cat $tester_dir/files_extracted.txt|grep "HARD_BIN:"|awk '{print...
3,296
Posted By Raynon
Multiple variable in a variable in Perl
Hi All,

I am trying to convert the below Csh while loop into Perl while loop but the problem is that in this csh script, i have 2 variables inside a variable -> $count is a variable {SB$count} as...
8,087
Posted By Raynon
Hi pludi, Thanks for the guidance! :b: ...
Hi pludi,

Thanks for the guidance!
:b: :)
8,087
Posted By Raynon
Hi KevinDAC, Thanks for the advice, but...
Hi KevinDAC,

Thanks for the advice, but what's the below code trying to do ?
And what does @_ represent ?
And what if there are 2 array list ? Which method would be better ?


my ($w, $h,...
8,087
Posted By Raynon
Perl Function Array Arguement Passing
Hi All,

I have some questions regarding array arguements passing for Perl Function.
If @array contains 2 items , arguements passing would be like Code_A.
But what if @array needs to add in more...
30,042
Posted By Raynon
Hi spirtle, Thanks alot for the advice. ...
Hi spirtle,

Thanks alot for the advice.
It's working fine now. :)
30,042
Posted By Raynon
Find Existence of File with wild card using Csh
Hi All,

I would like to find out the existence of files with wild card using CSH.
I have used the below code but does not seem to work.
Can any expert give me some advice ?



set nonomatch...
5,627
Posted By Raynon
Passing arguments to Perl Function
Hi All,

I am trying to pass an argument called "Pricelist" to a Perl function, then the function will open and print out the contents of the file named "Pricelist". But i can't seem to do it...
Showing results 1 to 25 of 349

 
All times are GMT -4. The time now is 02:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy