Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8565777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:30:21+00:00 2026-06-11T17:30:21+00:00

I have a result of an sql query.it returns some 10 rows like below:

  • 0

I have a result of an sql query.it returns some 10 rows like below:

if i do the below in my perl script.

print $result

it gives me the output :

 key       value                            
 ----------- ------------------------------ 
  1428116300 0003000                        
   560779655 0003001                        
   173413463 0003002                        
      315642 0003003                        
  1164414857 0003004                        
   429589116 0003005 

i just want to acheive that the first two lines to be deleted. and store the rest of each line in an array.
could any body please tell how do i achive this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:30:22+00:00Added an answer on June 11, 2026 at 5:30 pm

    With something like :

    my @lines = split /\n/, $result;
    splice @lines,0,2;
    

    Explanations :

    split /\n/, $result is cutting your variable into an array of lines.

    grep /^[\s\d]+$/ is filtering this array, and only keeps the elements that are a single line of spaces or digits (thus removing the first two lines)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL Server 2005 output like this: Date | Result | Sum
I have a very complex Linq to SQL query that returns a result set
I have a Sql Query which returns me over half million rows to process...
I have a MySQL query like this: SELECT *, SUM(...some SQL removed for brevety)
I have a result of a db query in java.sql.ResultSet that needs to be
I have some problems with writing a SQL query for MySQL. I have a
I have the following sql query and I want to filter the results where
I have an SQL query with a nested join: SELECT rh.host, rh.report, COUNT(results.id), COUNT(results_2.id),
I have an array which has the contents as the result of an sql
I currently have a request to build a shell script to get some data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.