Explain perl formatting commands


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Explain perl formatting commands
# 1  
Old 11-28-2011
Explain perl formatting commands

Could you please tell the meaning of Below mentioned perl script lines:
Code:
format OWNER_TOTAL =
@< Owner Code @<<<<<<total:    @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @######
#.##
$prev_cust_type, $prev_owner_code, $ototal_open_amt,$otot_defer_amt,$otot_unbilled_amt,$otot_terms_amt,$otot_curr_stmt,$otot_eight_days,$otot_fifteen_days,$ot
ot_twenty_two_days,$otot_twenty_nine_days,$otot_fifty_seven_days,$otot_eighty_four_days;

Moderator's Comments:
Mod Comment Please use code tags!

Last edited by joeyg; 11-28-2011 at 12:32 PM.. Reason: Changed title from "Need Help Urgent" to more indicative
# 2  
Old 11-28-2011
Hello,

Per our forum rules, all threads must have a descriptive subject text. For example, do not post questions with subjects like "Help Me!", "Urgent!!", "Doubt" or anything that does not accurately reflect the nature of your problem. Post subjects like "Execution Problems with Cron" or "Help with Backup Shell Script".

The reason for this is that nearly 95% of all visitors to this site come here because they are referred by a search engine. In order for future searches on your post (with answers) to work well, the subject field must be something useful and related to the problem!

In addition, current forum users who are kind enough to answer questions should be able to understand the essence of your query at first glance.

So, as a benefit and courtesy to current and future knowledge seekers, please be careful with your subject text. You might receive a forum infraction if you don't pay attention to this.

Thank you.

The UNIX and Linux Forums
# 3  
Old 11-28-2011
Each of the @ is the formatting for the variables with the $
The first couple are text, and then all the rest provide a standard layout for the numeric representations of number values. The numbers all seem to be in format of 1234567.89 as in one million two-hundred thirty-four thousand five hundred and sixty-seven point eighty-nine.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issues formatting output of two commands in a single line.

I wish to generate output of two commands in the same line separated by a single white-space. Below is my command and output in the same line. ls -ltr fname1.out | awk '{$2=$4=$5=x; print}' | tr '\n' '\t' | tr -s ' '; cksum<fname1.out | cut -d' ' -f1 Output: -rw-r--r--. root Aug 26 16:57... (6 Replies)
Discussion started by: mohtashims
6 Replies

2. UNIX for Beginners Questions & Answers

Perl/Array Sorting : Can someone please explain below code $h{$_}++

sub uniq { my %h; return grep { !$h{$_}++ } @_ } The above code is to remove duplicates from array. I am having hard time understanding below things (basically around highlighted code in bold)- when was the value inserted in hash? and are we only adding a key in Hash not... (1 Reply)
Discussion started by: Tanu
1 Replies

3. Shell Programming and Scripting

can you explain this perl command?

I am using this line of perl code to change the file format and remove ^M at the end of each line in files: perl -i -pe's/\r$//;' <name of file here> Can you explain to me what this code does, and translate it into bash/awk/sed? (2 Replies)
Discussion started by: locoroco
2 Replies

4. Shell Programming and Scripting

Multiple awk commands with some formatting

Hi, I am trying to extract data from output files. I have three awk commands that can be used. All the three commands works separately. The second and third are similar as it outputs 'line 3' and 'line 13' after the common 'string' (I do not know how to combine them). I would like to get the... (4 Replies)
Discussion started by: p_sun
4 Replies

5. UNIX for Dummies Questions & Answers

Explain the difference between the commands cd ~smart and cd ~/smart

Is it possible for both commands to work? (1 Reply)
Discussion started by: phunkypants
1 Replies

6. Shell Programming and Scripting

Can someone please explain what tr#A-Za-z0-9+/# -_#; means in perl?

Can someone please explain what tr#A-Za-z0-9+/# -_#; means in perl? (4 Replies)
Discussion started by: 3junior
4 Replies

7. Shell Programming and Scripting

perl: Please explain this for me: $hexdigit = (0 .. 9, 'a' .. 'f')[$num & 15];

This is taken from perlop. I can't understand what's going on, please can someone explain this for me? $hexdigit = (0 .. 9, 'a' .. 'f'); to get a hexadecimal digit (2 Replies)
Discussion started by: ksheller
2 Replies

8. UNIX for Advanced & Expert Users

perl explain syntax !!!

hi all i was going through some perl code i came across this line and i am not getting what is exactly going on .. $$this{localtion} = GetName->GetVarName("EXE_DIR") ; what is the red part doing in above code (2 Replies)
Discussion started by: zedex
2 Replies

9. UNIX for Dummies Questions & Answers

explain the commands below

logfile=$(find $jobroot/logs -mtime -1 | grep runoraback ) echo 'here is the logfile:' echo "$logfile" echo "$logfile" > $wkdir/log.$$ (3 Replies)
Discussion started by: bn_unx
3 Replies

10. Shell Programming and Scripting

perl doubt plz explain....

hi all i wrote a shell script which uses perl script my code is : >cat filename | while read i >do >perl -e 'require "/home/scripts/abc.pl" ; abc("$i")' >done perl script used will simply check syntax of Cobol programs but it didn't work for me so i asked my colleague he suggested... (1 Reply)
Discussion started by: zedex
1 Replies
Login or Register to Ask a Question